Using Augeas under Puppet is handy for writing adhoc config files, but its syntax can be a bit of a fight.

One of the things I've always liked about Puppet is how simple it is to configure a machine, but I've never been a big fan of Augeas. I use it, but I find it awkward to craft what I want to do.

Dom Cleal has written an extremely useful module - augeasproviders. Using Augeas as the backend, Dom has re-written a couple of the standard providers (host, mailalias) but added some very handy providers too, not least of which is sshd_config.

Here's a simple example:

sshd_config { 'PermitRootLogin':
 value  => 'without-password',
 notify => Service['sshd'],

sshd_config { 'AllowUsers':
 value  => [ 'root', 'mark' ],
 notify => Service['sshd'],



comments powered by Disqus