diff --git a/tests/tests_alternative_file.yml b/tests/tests_alternative_file.yml index 764fc61..a16a3a2 100644 --- a/tests/tests_alternative_file.yml +++ b/tests/tests_alternative_file.yml @@ -164,7 +164,7 @@ - "'MaxStartups 100' not in config3.content | b64decode" - "'Compression no' not in config3.content | b64decode" - - name: Check the main configuration file contains some default values for RHEL 9 or Fedora + - name: Check the main configuration file contains some default values for RHEL 9 ansible.builtin.assert: that: - "'Include /etc/ssh/sshd_config.d/*.conf' in config3.content | b64decode" @@ -173,6 +173,18 @@ when: - ansible_facts['os_family'] == 'RedHat' - ansible_facts['distribution_major_version']|int > 8 + - ansible_facts['distribution'] != 'Fedora' + + - name: Check the main configuration file contains some default values for Fedora + ansible.builtin.assert: + that: + - "'Include /etc/ssh/sshd_config.d/*.conf' in config3.content | b64decode" + - "'AuthorizedKeysFile .ssh/authorized_keys' in config3.content | b64decode" + - "'Subsystem sftp /usr/libexec/sftp-server' in config3.content | b64decode" + when: + - ansible_facts['os_family'] == 'RedHat' + - ansible_facts['distribution_major_version']|int > 8 + - ansible_facts['distribution'] == 'Fedora' - name: Check the generated config has requested properties ansible.builtin.assert: diff --git a/tests/tests_alternative_file_role.yml b/tests/tests_alternative_file_role.yml index 3c07c8c..ee5c2f5 100644 --- a/tests/tests_alternative_file_role.yml +++ b/tests/tests_alternative_file_role.yml @@ -183,7 +183,7 @@ - "'MaxStartups 100' not in config3.content | b64decode" - "'Compression no' not in config3.content | b64decode" - - name: Check the main configuration file contains some default values for RHEL 9 or Fedora + - name: Check the main configuration file contains some default values for RHEL 9 ansible.builtin.assert: that: - "'Include /etc/ssh/sshd_config.d/*.conf' in config3.content | b64decode" @@ -192,6 +192,18 @@ when: - ansible_facts['os_family'] == 'RedHat' - ansible_facts['distribution_major_version']|int > 8 + - ansible_facts['distribution'] != 'Fedora' + + - name: Check the main configuration file contains some default values for Fedora + ansible.builtin.assert: + that: + - "'Include /etc/ssh/sshd_config.d/*.conf' in config3.content | b64decode" + - "'AuthorizedKeysFile .ssh/authorized_keys' in config3.content | b64decode" + - "'Subsystem sftp /usr/libexec/sftp-server' in config3.content | b64decode" + when: + - ansible_facts['os_family'] == 'RedHat' + - ansible_facts['distribution_major_version']|int > 8 + - ansible_facts['distribution'] == 'Fedora' - name: Check the generated config has requested properties ansible.builtin.assert: