#!/usr/bin/env bash # Ref: # https://medium.com/@emachnic/using-policyfiles-with-chef-client-local-mode-4f47477b24db ./scripts/export_policy.sh pushd policy-export > /dev/null if [ "$1" = "dry" ]; then OPT="--why-run" elif [ "$1" = "debug" ]; then OPT="--log_level debug" fi bundle exec chef-client --chef-license 'accept' -z ${OPT} popd > /dev/null ./scripts/end_run.sh