Signed-off-by: Jeremy MAURO <jeremy.mauro@gmail.com>
@@ -4,6 +4,9 @@
# https://medium.com/@emachnic/using-policyfiles-with-chef-client-local-mode-4f47477b24db
./scripts/export_policy.sh
pushd policy-export > /dev/null
-bundle exec chef-client --chef-license 'accept' -z
+if [ "$1" = "dry" ]; then
+ DRY="--why-run"
+fi
+bundle exec chef-client --chef-license 'accept' -z ${DRY}
popd > /dev/null
./scripts/end_run.sh