File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 1+ - name : Grab facts to determine distribution
2+ setup :
3+
14- name : Ensure drop in directory exists
25 file :
36 path : /etc/ssh/sshd_config.d/*.conf
811 become : true
912
1013- name : Ensure drop in directory is included
11- lineinfile :
14+ blockinfile :
1215 dest : /etc/ssh/sshd_config
13- regexp : " ^Include /etc/ssh/sshd_config.d/*.conf"
14- line : " Include /etc/ssh/sshd_config.d/*.conf"
16+ content : |
17+ # To modify the system-wide sshd configuration, create a *.conf file under
18+ # /etc/ssh/sshd_config.d/ which will be automatically included below
19+ Include /etc/ssh/sshd_config.d/*.conf
1520 state : present
16- insertbefore : " BOF "
21+ insertafter : " # default value. "
1722 validate : sshd -t -f %s
1823 notify :
1924 - Restart sshd
2025 become : true
26+ when : ansible_facts.distribution_major_version == '8'
2127
2228- name : Template sshd configuration
2329 # NB: If parameters are defined multiple times the first value wins;
You can’t perform that action at this time.
0 commit comments