Hi,

I'm just starting to play with puppet and augeas and I've managed to add a 
new user to the AllowUsers list of *sshd_config*.

I'm doing it this way:

$user='testuser'

augeas {'test':
    context     => '/files/etc/ssh/sshd_config',
    changes     => [
        "defnode 001 etc/ssh/sshd_config/AllowUsers/001 $user",
    ],
    onlyif      => "match etc/ssh/sshd_config/AllowUsers/*[.='${user}'] 
size == 0"
}

Because this is one of my first real use case of puppet and augeas, I'm 
just wondering what's the best way to achieve the same goal and add a user 
to AllowUsers.
How would you, folks, do that ? Am I using the right augeas directives ?

Thanks for your replies.

Cheers

Rémi Ferrand

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/d9f9ea50-95e0-4a2f-a3bf-adb41de65ef2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to