export_policy.sh 311 B

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