separate failing test for Fedora / RHEL

due to difference in
Subsystem sftp /usr/libexec/openssh/sftp-server (RHEL)
Subsystem sftp /usr/libexec/sftp-server (Fedora)
This commit is contained in:
Stefan Weber 2023-04-20 11:33:45 +02:00 committed by Jakub Jelen
parent 742a88e3c6
commit 0aea603673
2 changed files with 26 additions and 2 deletions

View file

@ -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:

View file

@ -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: