The following function is based on code I found here in an earlier
thread.
define sudoer() {
augeas { "sudo${name}":
context => "/files/etc/sudoers",
changes => [
"set spec[last() + 1]/user ${name}",
"set spec[last()]/host_group/host ALL",
"set spec[last()]/host_group/command NOPASSWD: ALL",
"set spec[last()]/host_group/command/runas_user ALL",
],
}
In that example, the command line looked like this:
"set spec[last()]/host_group/command ALL",
I added NOPASSWD: and it barfs with this message:
err: //user::unixadmins/User::Virtual::Sudoer[joe]/Augeas[sudojoe]/
returns: change from need_to_run to 0 failed: Save failed with return
code false
The problem seems to be the colon ':' since NOPASSWD:ALL also fails
but this doesn't error:
"set spec[last()]/host_group/command NOPASSWD ALL",
Unfortunately, that doesn't produce a desirable output.
Any suggestions?
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.