Created
March 5, 2019 22:43
-
-
Save trlinkin/313e6431e02fc9b2c170a73f496fb927 to your computer and use it in GitHub Desktop.
Augeas to resolve duplicates and set the correct entry in sshd_config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
augeas { "sshd_config": | |
changes => [ | |
"rm /files/etc/ssh/sshd_config/AllowTcpForwarding", | |
"set /files/etc/ssh/sshd_config/AllowTcpForwarding yes", | |
], | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@master ~]# cat /etc/ssh/sshd_config | grep AllowTcpForwarding | |
#AllowTcpForwarding yes | |
AllowTcpForwarding yes | |
AllowTcpForwarding no | |
AllowTcpForwarding yes | |
[root@master ~]# puppet apply /tmp/aug.pp | |
Notice: Compiled catalog for master.pe-lab-2019.puppet.vm in environment production in 0.09 seconds | |
Notice: /Stage[main]/Main/Augeas[sshd_config]/returns: executed successfully | |
Notice: Applied catalog in 1.47 seconds | |
[root@master ~]# cat /etc/ssh/sshd_config | grep AllowTcpForwarding | |
#AllowTcpForwarding yes | |
AllowTcpForwarding yes | |
[root@master ~]# puppet apply /tmp/aug.pp | |
Notice: Compiled catalog for master.pe-lab-2019.puppet.vm in environment production in 0.06 seconds | |
Notice: Applied catalog in 1.40 seconds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment