Re: [Puppet Users] Removing lines from a file

John Kennedy
Wed, 21 Mar 2012 12:07:50 -0000

On Wed, Mar 21, 2012 at 12:02, Craig Dunn <craig@craigdunn.org> wrote:

>  On 21/03/2012 11:48, John Kennedy wrote:
>
> Hello all,
> I am fairly new to Puppet but learning.
> I know what I want to do can be done I just can not get things to go
> right...
>
> We want to start using the capability of sudo to look in /etc/sudoers.d to
> get user specific sudo permissions. Before we add a User_Alias file, the
> corresponding configuration needs to be removed from the sudoers file:
>
>
> I would suggest looking at Augeas..
>
> http://augeas.net
>
> Theres some useful documentation about using it with Puppet here
> (including some examples around sudoers)
>
>
http://projects.puppetlabs.​com/projects/1/wiki/puppet_​augeas<http://projects.puppetlabs.com/projects/1/wiki/puppet_augeas>
>
> Regards
> Craig
>

Thanks Craig. I think the problem was the # at the beginning...I tried
again just now using a different line (User_Alias ADMINS john,chris,james) and
it worked. Now I just need to get it to delete more
than one line...
I will look at Augeas as well.