Răsfoiți Sursa

Reorganize the scripts

Signed-off-by: Jeremy MAURO <jeremy.mauro@gmail.com>
Jeremy MAURO 3 ani în urmă
părinte
comite
6cb0b1f19b
3 a modificat fișierele cu 14 adăugiri și 6 ștergeri
  1. 11 0
      scripts/export_policy.sh
  2. 1 1
      scripts/launch_debug.sh
  3. 2 5
      scripts/run_policy.sh

+ 11 - 0
scripts/export_policy.sh

@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+# Ref:
+# 	https://medium.com/@emachnic/using-policyfiles-with-chef-client-local-mode-4f47477b24db
+rm -rf policy-export/*
+bundle exec chef-cli update base.rb 
+bundle exec chef-cli export base.rb -a policy-export
+pushd policy-export > /dev/null
+tar xfz *.tgz && rm -rf *.tgz
+#bundle exec chef-client --chef-license 'accept' -z
+popd > /dev/null

+ 1 - 1
scripts/launch_debug.sh

@@ -1,5 +1,5 @@
 #!/usr/bin/env bash
-
+./scripts/export_policy.sh
 cat << _EOF > policy-export/.chef/config_solo.rb
 log_level          :debug
 log_location       '/dev/null'

+ 2 - 5
scripts/run_policy.sh

@@ -2,10 +2,7 @@
 
 # Ref:
 # 	https://medium.com/@emachnic/using-policyfiles-with-chef-client-local-mode-4f47477b24db
-rm -rf policy-export/*
-bundle exec chef-cli update base.rb 
-bundle exec chef-cli export base.rb -a policy-export
+./scripts/export_policy.sh
 pushd policy-export > /dev/null
-tar xfz *.tgz && rm -rf *.tgz
-#bundle exec chef-client --chef-license 'accept' -z
+bundle exec chef-client --chef-license 'accept' -z
 popd > /dev/null