On Friday, November 19, 2010 07:50 EST, walexey <wale...@gmail.com> wrote: > Hello everybody! > How can i create with puppet following sudoers file: > > User_Alias CENTREON=apache,nagios > CENTREON ALL = NOPASSWD: /etc/init.d/nagios* restart > CENTREON ALL = NOPASSWD: /etc/init.d/nagios* reload > CENTREON ALL = NOPASSWD: /usr/bin/nagios* -v * > > The problem that augeas create only last line, replacing previous one.
If you are using a more recent Linux distribution and you have at least sudo >= 1.7.1 (I think), then you can have a #includedir line in your /etc/sudoers file (eg, #includedir /etc/sudoers.d) and you can simply just put a file in there containing your sudo rules. Might be easier than trying to use Augeas, but might not suit your needs. Check your man page for more details! Regards, Andrew -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.