only track modular configs for 9
This commit is contained in:
parent
3caef872e8
commit
13c1a9a8c2
@ -22,6 +22,19 @@
|
||||
validate: /usr/sbin/sshd -t -f %s
|
||||
backup: true
|
||||
notify: restart_sshd
|
||||
when:
|
||||
- ansible_distribution_major_version == '8'
|
||||
|
||||
- name: Ensure an empty file exists
|
||||
ansible.builtin.template:
|
||||
state: touch
|
||||
path: "/etc/ssh/sshd_config.d/99-end.conf"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0600'
|
||||
notify: restart_sshd
|
||||
when:
|
||||
- ansible_distribution_major_version == '8'
|
||||
|
||||
- name: Ensure sshd_config.d dir exists
|
||||
ansible.builtin.file:
|
||||
@ -37,16 +50,16 @@
|
||||
- (ansible_facts['distribution'] == 'Fedora') or
|
||||
(ansible_facts['distribution'] in el_distro_name and ansible_facts['distribution_major_version']|int >= 9)
|
||||
block:
|
||||
- name: Modular configuration (redhat)
|
||||
template:
|
||||
src: "etc/ssh/{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-50-redhat.conf.j2"
|
||||
dest: "{{ ssh_modular_config }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0600'
|
||||
validate: /usr/sbin/sshd -t -f %s
|
||||
backup: yes
|
||||
notify: restart_sshd
|
||||
#- name: Modular configuration (redhat)
|
||||
# template:
|
||||
# src: "etc/ssh/{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-50-redhat.conf.j2"
|
||||
# dest: "{{ ssh_modular_config }}"
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: '0600'
|
||||
# validate: /usr/sbin/sshd -t -f %s
|
||||
# backup: yes
|
||||
# notify: restart_sshd
|
||||
|
||||
- name: Custom Modular Configuration
|
||||
template:
|
||||
|
Loading…
Reference in New Issue
Block a user