Avi Miller wrote: > Hey gang, > > I seem to be having a brain disconnect on how to get the Augeas type to > manage things that have multiple values (i.e. an Augeas tree) via Puppet. > > If I run this in augtool: > > augtool> set /files/etc/ssh/sshd_config/AllowGroups/1000 sshuser > augtool> save > > I see this in /etc/ssh/sshd_config: > > AllowGroups sshuser > > However, if I try this in an Augeas type: > > augeas { "sshd_conf_group_sshuser": > context => "/files/etc/ssh/sshd_config", > changes => "set /files/etc/ssh/sshd_config/AllowGroups/10000 sshuser", > }
Think of the context as a "save me from typing" prepending to the changes and only ifs. So.. try writing it like this: augeas { "sshd_conf_group_sshuser": context => "/files/etc/ssh/sshd_config", changes => "set AllowGroups/10000 sshuser", onlyif => "match AllowGroups != sshuser } The code will prepend the context onto your set and match to give it the correct full path. BTW.. I asked James to pull in some code which should make the need to set and do an onlyif on the same code not necessary. -- bk --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---