As a customer always on the lookout for new and better possibilities for Chef workflow, you have decided to test out Policyfiles but can’t quite fit it in to the way you work right now.
Note: Policyfiles API support was only complete with the release of Chef Server 12.2.0 and ChefDK 0.8 or higher. The largest remaining part of the featureset before that point was deletion of policyfile objects. Check your versions if things like this seem to be off.
That’s certainly ok and we would encourage you to contact Support with your issue. They may be able to suggest an improved path to achieving your goal.
In the event you decide that you would rather continue for the time being with standard Chef Client runs populated by Berkshelf, Librarian, or something else, that’s perfectly fine too. The procedure below will allow you revert to using the standard workflows
- In /etc/chef/client.rb on the node that should no longer use Policyfiles support, remove the following configuration item completely. The default behavior of the chef-client is the standard, non-policyfiles behavior.
- Once Policyfiles is enabled, it overwrites the existing run_list of the chef-client, replacing it with its own run_list. To restore the original run_list, you will need to have saved it before transitioning to Policyfiles usage. To restore, just perform a chef-client run using the original, standard workflow run_list, like this. Once the chef-client run completes successfully, it will write the restored run_list to the node data.
chef-client -r recipe[mything],role[another],recipe[somethingelse]
At this point, the chef-client operated on above will have reverted to its original operating mode, the same as things have been since chef-client 0.1