run_policy.sh 320 B

123456789101112
  1. #!/usr/bin/env bash
  2. # Ref:
  3. # https://medium.com/@emachnic/using-policyfiles-with-chef-client-local-mode-4f47477b24db
  4. ./scripts/export_policy.sh
  5. pushd policy-export > /dev/null
  6. if [ "$1" = "dry" ]; then
  7. DRY="--why-run"
  8. fi
  9. bundle exec chef-client --chef-license 'accept' -z ${DRY}
  10. popd > /dev/null
  11. ./scripts/end_run.sh