Open klm46 opened 8 years ago
You should create your own module and then use this module to to the process the inputs.
Create: /etc/puppetlabs/code/environments/production/mymodule/manifests
/etc/puppetlabs/code/environments/production/mymodule/manifests/init.pp
Add to init.pp: class mymodule { sudoers::allowed_command{ "acme": command => "/usr/sbin/service", user => "acme", require_password => false, comment => "Allows access to the service command for the acme user" } }
This is only an example. But that should help you use this module with your own.
thanks man - i was really husseling for that - and i forgot to say thank you ;)
glad that it worked out for you. it can be tricky on where to put things. happy puppetizing!
Hi, i just got a problem with where to put the declaration as in your description. I added my content in "allowed_command.pp" (tried pretty the same as here for beginning) but a puppet run does not take any effect. I did not change anything at the files, in the site.pp at the top of puppet, i included this module. This is ok. But why my data does not be done? And no file at /etc/sudoers.d/ will be created. Puppetrun ends without error.
sudoers::allowed_command{ "acme": command => "/usr/sbin/service", user => "acme", require_password => false, comment => "Allows access to the service command for the acme user" }