augtool --backup <<END
rename /files/etc/ssh/sshd_config/#comment[. =~ regexp('PermitRootLogin.*')] PermitRootLogin
set /files/etc/ssh/sshd_config/PermitRootLogin without-password
save
END
Load a File with A Specific Lens
:~# augtool --backup
augtool> set /augeas/load/Shellvars/incl[last()+1] "/etc/exim4/update-exim4.conf.conf"
augtool> load
augtool> set /files/etc/exim4/update-exim4.conf.conf/dc_smarthost 'mail.domain.com'
augtool> save
augtool> quit
Puppet
augeas { "exim4-config":
lens => 'Shellvars.lns',
incl => '/etc/exim4/update-exim4.conf.conf',
context => '/files/etc/exim4/update-exim4.conf.conf',
changes => [
"set dc_smarthost 'mail.domain.com'"
],
}