On Tue, 2009-03-03 at 10:05 +1100, Avi Miller wrote: > Hey Bryan, > > Bryan Kearney wrote: > > augeas { "sshd_conf_group_sshuser": > > context => "/files/etc/ssh/sshd_config", > > changes => "set AllowGroups/10000 sshuser", > > onlyif => "match AllowGroups != sshuser > > } > > This doesn't seem to work either. If I try it without the "onlyif", > it'll add the sshuser group line properly. However, if I add the onlyif > line, it does not add the line at all. I tested this on an sshd_config > file that had no AllowGroups entries and one that had a different entry. > > Help! :)
If you are using Augeas 0.4.0 or newer, you can use the following: ... onlyif => "match AllowGroups/*[ . = 'sshuser']" ... That will produce a match iff there is an AllowGroups node that has a child with value 'sshuser'. David --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@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 -~----------~----~----~----~------~----~------~--~---