|
@@ -1,5 +1,6 @@
|
|
#!/usr/bin/env bash
|
|
#!/usr/bin/env bash
|
|
./scripts/export_policy.sh
|
|
./scripts/export_policy.sh
|
|
|
|
+# Setup the configuration file
|
|
cat << _EOF > policy-export/.chef/config_solo.rb
|
|
cat << _EOF > policy-export/.chef/config_solo.rb
|
|
log_level :debug
|
|
log_level :debug
|
|
log_location '/dev/null'
|
|
log_location '/dev/null'
|
|
@@ -15,5 +16,24 @@ Mixlib::Log::Formatter.show_time = true
|
|
_EOF
|
|
_EOF
|
|
|
|
|
|
cd policy-export
|
|
cd policy-export
|
|
|
|
+mkdir -p nodes
|
|
|
|
+# Create the node
|
|
|
|
+cat << _EOF > "./nodes/$(hostname --fqdn).json"
|
|
|
|
+{
|
|
|
|
+ "name": "Thinkpad-vhdx.",
|
|
|
|
+ "chef_environment": "local",
|
|
|
|
+ "normal": {
|
|
|
|
+ "tags": [
|
|
|
|
+
|
|
|
|
+ ]
|
|
|
|
+ },
|
|
|
|
+ "run_list": [
|
|
|
|
+ "recipe[workstation::default]"
|
|
|
|
+ ],
|
|
|
|
+ "policy_name": "base",
|
|
|
|
+ "policy_group": "local"
|
|
|
|
+}
|
|
|
|
+_EOF
|
|
bundle exec chef-shell -s -c .chef/config_solo.rb
|
|
bundle exec chef-shell -s -c .chef/config_solo.rb
|
|
cd -
|
|
cd -
|
|
|
|
+./scripts/end_run.sh
|