run_policy.sh 316 B

12345678910
  1. #!/usr/bin/env bash
  2. # Ref:
  3. # https://medium.com/@emachnic/using-policyfiles-with-chef-client-local-mode-4f47477b24db
  4. bundle exec chef-cli update base.rb
  5. bundle exec chef-cli export base.rb -a policy-export
  6. pushd policy-export > /dev/null
  7. tar vxfz *.tgz && rm -rf *.tgz
  8. bundle exec chef-client -z
  9. popd > /dev/null