Closed danpoltawski closed 4 months ago
You could create a file resource with "ensure => file":
file {'/etc/sudoers.d/DoNotTouch':
ensure => file,
}
This would tell Puppet that the file itself is "known to puppet" but Puppet won't attempt to manage or delete it.
@danpoltawski If we could modify Defaults
as suggested in #282 it might help with your problem.
I wanted to use
sudo::conf
to manage some/etc/sudoers.d/
snippets but it proved very difficult to achieve this:/etc/sudoers
haspassprompt
controlled by a custom variable (see full file below)- I was unable to pass the current template withsudo::content
in due to https://github.com/saz/puppet-sudo/issues/272 - I needed the contents parsed in my codeconfig_file_replace
parameter its not possible to manage the file independently with puppet as this module takes over the file definitionIn the end I had to set
config_file
to another path to be able to manage this file indepdenneltyCurrent sudo file: