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:
parent
fb0779f657
commit
2f90091f0a
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in a new issue