Two questions about Match, both using sshd_config as an example. Calling augeas from Puppet, I can do this:
context => '/files/etc/ssh/sshd_config', changes => [ 'ins PermitTunnel before Match[1]', 'set PermitTunnel yes', ], onlyif => 'get PermitTunnel != yes', My problem is that I normally don't have a Match block (and would like to avoid creating a dummy one). 1. How can I insert the parameter before the Match block if the Match block exists, otherwise just insert the parameter? 2. How does it work with this line? (the line already exists in the config) Set Subsystem sftp /usr/libexec/openssh/sftp-server context => '/files/etc/ssh/sshd_config', changes => [ 'ins Subsystem before Match[1]', 'set Subsystem/sftp "internal-sftp"', ], onlyif => 'get Subsystem/sftp != "internal-sftp"', (do I really need the onlyif part?) Thanks. -- James Patterson [email protected] -- http://www.fastmail.fm - Send your email first class _______________________________________________ augeas-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/augeas-devel
