diff --git a/tests/tasks/setup.yml b/tests/tasks/setup.yml index a0e9324..ca75940 100644 --- a/tests/tasks/setup.yml +++ b/tests/tasks/setup.yml @@ -25,6 +25,6 @@ main_sshd_config: /etc/ssh/sshd_config.d/00-ansible_system_role.conf main_sshd_config_name: 00-ansible_system_role.conf main_sshd_config_path: /etc/ssh/sshd_config.d/ - when: > - ansible_facts['os_family'] == 'RedHat' and - ansible_facts['distribution_major_version']|int > 8 + when: + - ansible_facts['os_family'] == 'RedHat' + - ansible_facts['distribution_major_version']|int > 8 diff --git a/tests/tests_config_namespace.yml b/tests/tests_config_namespace.yml index 6688907..2eca977 100644 --- a/tests/tests_config_namespace.yml +++ b/tests/tests_config_namespace.yml @@ -74,7 +74,8 @@ - "config.content | b64decode | regex_search('Match address \\*\\s*PasswordAuthentication yes')" - "config.content | b64decode | regex_search('Match address \\*\\s*PasswordAuthentication no')" when: - - ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] == '6' + - ansible_facts['os_family'] == 'RedHat' + - ansible_facts['distribution_major_version'] == '6' - name: Check content of configuration file assert: diff --git a/tests/tests_hostkeys_fips.yml b/tests/tests_hostkeys_fips.yml index 7cf3767..e994f85 100644 --- a/tests/tests_hostkeys_fips.yml +++ b/tests/tests_hostkeys_fips.yml @@ -39,7 +39,8 @@ that: - "'HostKey /etc/ssh/ssh_host_ed25519_key' in config.content | b64decode" when: - - ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version']|int < 9 + - ansible_facts['os_family'] == 'RedHat' + - ansible_facts['distribution_major_version']|int < 9 - name: Check host key was generated assert: @@ -47,7 +48,8 @@ - privkey.stat.exists - pubkey.stat.exists when: - - ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version']|int > 6 + - ansible_facts['os_family'] == 'RedHat' + - ansible_facts['distribution_major_version']|int > 6 tags: tests::verify - name: Fake FIPS mode @@ -122,7 +124,8 @@ - not privkey.stat.exists - not pubkey.stat.exists when: - - ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] in ['7', '8'] + - ansible_facts['os_family'] == 'RedHat' + - ansible_facts['distribution_major_version']|int > 6 tags: tests::verify - name: Remove the FIPS mode indicators