I have liked this solution.. I was using an erb template to manage
the /etc/sudoers file.
Using augeas seems to be much better. However, I have one question,
that is due to my lack of experience with augeas. If the command has
multiple values, each one separated with a comma, how would I pass
this
On Jun 30, 2010, at 1:52 PM, Jeff wrote:
> When I removed that line, I got a new entry each time puppet ran...
I know. I wasn’t referring to the “onlyif” line alone, but the whole thing.
See my original post, starting where I said “Also note that your example as
written will add this entry to t
On Jun 30, 1:25 pm, Rob McBroom wrote:
> On Jun 30, 2010, at 1:14 PM, Jeff wrote:
>
> > onlyif => "match *[user = '${name}'] size == 0”,
>
> I originally had that exact thing, but like I said, it will only add the
> entry. If you ever change the command, tag, etc. Puppet won’t do anything
>
On Jun 30, 2010, at 1:14 PM, Jeff wrote:
> onlyif => "match *[user = '${name}'] size == 0”,
I originally had that exact thing, but like I said, it will only add the entry.
If you ever change the command, tag, etc. Puppet won’t do anything because the
user already has an entry. Maybe you’re
Rob,
Thanks for the reply. I took a step back and starting googling Augeas
instead of puppet and Augeas. Here's how I was able to solve this
problem:
define sudoer() {
augeas { "sudo${name}":
context => "/files/etc/sudoers",
changes => [
"set spec[last() + 1]/user ${name}"