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