On Friday, November 8, 2013 12:23:11 PM UTC-5, Dominic Cleal wrote:
>
> On 06/11/13 21:17, Jist Anidiot wrote: 
> > I'm trying to make sure a specific user has a special ssh key used as 
> > his identity file. 
> > 
> > so I'm trying something like: 
> > 
> >  augeas{"user_second_key": 
> >     context => "/files/home/user/.ssh/config", 
> >     changes => [ "ins IdentityFile after 
> > /files/home/user/.ssh/config/IdentityFile[last()]", 
> >                  " set /files/home/user/.ssh/config/IdentityFile[last()] 
> > ~/.ssh/user2nd_rsa", 
> >                  ], 
> >     onlyif => "match /files/home/user/.ssh/config/IdentityFile 
> > not_include ~/.ssh/user2nd_rsa", 
> >     
> >   } 
> > 
> > However it adds the line every puppet run.  I'm wondering what I might 
> > be doing wrong. 
>
> Try: 
>
> onlyif => "match 
> /files/home/user/.ssh/config/IdentityFile[.='~/.ssh/user2nd_rsa'] size == 
> 0" 
>
>
>
Thanks that works.  

So what's the point of include and not_include if you have to do this weird 
size thing? 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/88458230-d854-4d01-a548-0294357de04c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to