|
@@ -2,9 +2,10 @@
|
|
|
|
|
|
# Ref:
|
|
|
# https://medium.com/@emachnic/using-policyfiles-with-chef-client-local-mode-4f47477b24db
|
|
|
+POLICY=${1:-"base"}
|
|
|
rm -rf policy-export/*
|
|
|
-bundle exec chef-cli update base.rb
|
|
|
-bundle exec chef-cli export base.rb -a policy-export
|
|
|
+bundle exec chef-cli update "${POLICY}.rb"
|
|
|
+bundle exec chef-cli export "${POLICY}.rb" -a policy-export
|
|
|
pushd policy-export > /dev/null
|
|
|
tar xfz *.tgz && rm -rf *.tgz
|
|
|
popd > /dev/null
|