Have you ever wanted to control the permissions of a file in Puppet without worrying about the contents of the file? As an example, we needed to deploy a private/public key pair – we didn’t want to place the keys in the git repo since the private key could potentially be exposed, but we wanted to make sure that when the file was in place that it had the correct permissions.

This might be old hat, but it wasn’t obvious to me from the PuppetLabs documentation, but if you don’t specify a source  or content  field in a file resource, you can set permissions, owner etc. without Puppet worrying about the contents of the file – so for example, you could use something like: