diff --git a/tasks/ssh_config.yml b/tasks/ssh_config.yml index 550177c..9a69a8a 100644 --- a/tasks/ssh_config.yml +++ b/tasks/ssh_config.yml @@ -25,6 +25,15 @@ when: - ansible_distribution_major_version == '8' + - name: Ensure sshd_config.d dir exists + ansible.builtin.file: + state: directory + path: "/etc/ssh/sshd_config.d" + owner: root + group: root + mode: '0700' + notify: restart_sshd + - name: Ensure an empty file exists ansible.builtin.template: state: touch @@ -36,15 +45,6 @@ when: - ansible_distribution_major_version == '8' - - name: Ensure sshd_config.d dir exists - ansible.builtin.file: - state: directory - path: "/etc/ssh/sshd_config.d" - owner: root - group: root - mode: '0700' - notify: restart_sshd - - name: Default Modular Configuration when: - (ansible_facts['distribution'] == 'Fedora') or