- Update the policy - Export it - Untar it - Run it on the local node Signed-off-by: Jeremy MAURO <jeremy.mauro@gmail.com>
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+# Ref:
+# https://medium.com/@emachnic/using-policyfiles-with-chef-client-local-mode-4f47477b24db
+bundle exec chef-cli update base.rb
+bundle exec chef-cli export base.rb -a policy-export
+pushd policy-export > /dev/null
+tar vxfz *.tgz && rm -rf *.tgz
+bundle exec chef-client -z
+popd > /dev/null