Ability to maintain files for Puppet Modules by environments.

Latest response

I want to setup a Puppet Module that manages a custom file across all my systems. What is the best way to allow Puppet to access this file, but also allow admins to modify the file if necessary without having to rebuild the Puppet Module?

Responses

David,

This kind of goes against the idea of how Puppet should be used.. ideally, the manual changes should be captured in version control and feed a CI process to rebuild/push the updated Puppet module/package.

If you must do it, you can always add a parameter to the Puppet module such as "manage_etc_hosts" and have an if block in the Puppet manifest that only controls /etc/hosts (for example) if this parameter is set to true. Default this parameter to true, and configure any hosts you don't want this file managed on to pass 'false', either through ENC or node/role definition.