saz / puppet-sudo

Manage sudo with Puppet on Debian-, RedHat- and SUSE-based linux distributions and some BSDs
Other
105 stars 215 forks source link

Add file managed by Puppet comments to all sudoers files #163

Closed esalberg closed 7 years ago

esalberg commented 7 years ago

The sudoers files for rhel5 and rhel6 do not reflect that they are managed by Puppet. Add consistent comment lines at the top of all the sudoers flatfiles.

esalberg commented 7 years ago

Also updated the content in conf.pp to add a line stating that the conf snippet is managed by Puppet, matching this from rsyslog: https://github.com/saz/puppet-rsyslog/blob/master/manifests/snippet.pp

I went back and forth on whether to have a trailing \n, and I decided not to have it, but I'm happy to put it back if preferred.

content => "# This file is managed by Puppet; changes may be overwritten\n${content_real}",

versus content => "# This file is managed by Puppet; changes may be overwritten\n${content_real}\n",

I was not able to test with an array, however. Do you think adding the comment would cause an issue with that?

esalberg commented 7 years ago

I fixed the rspec tests, but there's a json_pure bundler error on the older ruby version - do I need to do anything about that?