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",
}

I get the following errors from puppetd:

info: Caching catalog at /var/lib/puppet/localconfig.yaml
notice: Starting catalog run
/usr/share/augeas/lenses/sshd.aug:20.7-.37:Short split for concat
err: 
//Node[testnode]/ssh/Ssh::Sshd_conf_group[sshuser]/Augeas[sshd_conf_group_sshuser]/returns:
 
change from need_to_run to 0 failed: Save failed with return code false
notice: Finished catalog run in 9.46 seconds

I also want to add an onlyif to that type so that it only adds the 
sshuser group if it doesn't already exist, but none of these seem to work:

onlyif => "match /files/etc/ssh/sshd_config/AllowGroups/* != sshuser"
onlyif => "match /files/etc/ssh/sshd_config/AllowGroups/ != sshuser"
onlyif => "match /files/etc/ssh/sshd_config/AllowGroups != sshuser"


Any assistance/samples would be appreciated. :)

Thanks,
Avi

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to