I'd like to overwrite some of the files in a directory:
file {
ensure => directory,
source => 'puppet:///modules/my_module/my_directory',
mode => '0600',
recurse => true,
}
However, this changes the mode of every file in the directory. Since most of the files (thousands, changing every day) should be handled by another application, how can I tell Puppet to leave all files not in source
alone? I can't use ignore
because that requires that I know in advance the names (or at least globs) of files I don't want to manage.
You might be looking for
recurse => remote
[ref], which instructs puppet to only manage the files in the destination that come from the the source.Try the source_permissions parameter. Of course this assumes that you can set appropriate permissions in the source repository.