1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Add an important example for SSHd

Sudoers is a great example to show how you can prevent shutting yourself
out. But SSHd is at least as important to avoid syntax errors causing a
lot of grieve. So I think it deserves a spot in this list :-)
This commit is contained in:
Dag Wieers 2016-12-16 00:36:32 +01:00 committed by Brian Coca
parent fb0779f657
commit 2f90091f0a

View file

@ -101,4 +101,14 @@ EXAMPLES = '''
src: /mine/sudoers src: /mine/sudoers
dest: /etc/sudoers dest: /etc/sudoers
validate: 'visudo -cf %s' validate: 'visudo -cf %s'
# Update SSH configuration safely (avoid shutting yourself out)
- template:
src: etc/ssh/sshd_config.j2
dest: /etc/ssh/sshd_config.j2
owner: root
group: root
mode: '0600'
validate: /usr/sbin/sshd -t %s
backup: yes
''' '''