-
-
Save scottking2/6f408d50871ea10222f0ab9a99bb6597 to your computer and use it in GitHub Desktop.
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
/etc/ssh/sshd_config: | |
file.line: | |
- name: /etc/ssh/sshd_config | |
- mode: replace | |
- match: "#Banner*" | |
- content: 'Banner /etc/issue.net' | |
sshd: | |
service.running: | |
- enable: True | |
- reload: True | |
- watch: | |
- file: /etc/ssh/sshd_config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm having issues with the - match: "#Banner*" it isn't matching "#Banner /etc/ssh/sshd_config" nor is it matching "#Banner none"
Any ideas? is my regex incorrect?
It worked when I had the statement to match: '#Banner none" and applied the state to specific servers. but I want it to work with any server that already has #Banner in the sshd_config file.