Hello,

I struggled with this a long time and came up with an answer. 

On Thursday, December 23, 2010 2:21:58 AM UTC+1, Hugo Cisneiros (Eitch) 
wrote:
>
> In the example on hosts, the "alias" label is already named. So I
> can't think on adding another node/label dynamically.
>
 Well actually the dumbest thing work, as you said, "alias" is named, but 
the only reference for allowgroups fields are number. But you can use those 
as if it was a name, and put multiple values on the first value.

This works:

  augeas { "sshd-allowgroup-${name}":
    context => "/files/etc/ssh/sshd_config",
    changes => "set AllowGroups/1[last()+1] '${name}'",
    onlyif  => "match AllowGroups/*[.='${name}'] size == 0",
    notify  => Service["sshd"], 
  }

Hope it can still help you or someone else.

Regards

Thomas

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/DMfoJLf62FQJ.
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.

Reply via email to