mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-11-05 03:13:30 +01:00
Add whitespace around the filter symbol
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
parent
32b892c3e3
commit
d3e3bdce5a
9 changed files with 24 additions and 25 deletions
|
@ -6,7 +6,7 @@
|
|||
state: reloaded
|
||||
when:
|
||||
- sshd_allow_reload|bool
|
||||
- ansible_facts['virtualization_type']|default(None) not in __sshd_skip_virt_env
|
||||
- ansible_facts['virtualization_type'] | default(None) not in __sshd_skip_virt_env
|
||||
- ansible_connection != 'chroot'
|
||||
- ansible_facts['os_family'] != 'AIX'
|
||||
- ansible_facts['os_family'] != 'OpenWrt'
|
||||
|
|
|
@ -23,4 +23,4 @@
|
|||
when:
|
||||
- sshd_manage_firewall | bool or sshd_manage_selinux | bool
|
||||
- ansible_facts['os_family'] == 'RedHat'
|
||||
- ansible_facts['virtualization_type']|default(None) not in __sshd_skip_virt_env
|
||||
- ansible_facts['virtualization_type'] | default(None) not in __sshd_skip_virt_env
|
||||
|
|
|
@ -132,14 +132,14 @@
|
|||
- sshd_manage_firewall | bool
|
||||
- ansible_facts['os_family'] == 'RedHat'
|
||||
- ansible_facts['distribution_version'] is version('7', '>=')
|
||||
- ansible_facts['virtualization_type']|default(None) not in __sshd_skip_virt_env
|
||||
- ansible_facts['virtualization_type'] | default(None) not in __sshd_skip_virt_env
|
||||
|
||||
- name: Configure selinux
|
||||
ansible.builtin.include_tasks: selinux.yml
|
||||
when:
|
||||
- sshd_manage_selinux | bool
|
||||
- ansible_facts['os_family'] == 'RedHat'
|
||||
- ansible_facts['virtualization_type']|default(None) not in __sshd_skip_virt_env
|
||||
- ansible_facts['virtualization_type'] | default(None) not in __sshd_skip_virt_env
|
||||
|
||||
- name: Create the complete configuration file
|
||||
ansible.builtin.include_tasks: install_config.yml
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
state: started
|
||||
when:
|
||||
- sshd_manage_service|bool
|
||||
- ansible_facts['virtualization_type']|default(None) not in __sshd_skip_virt_env
|
||||
- ansible_facts['virtualization_type'] | default(None) not in __sshd_skip_virt_env
|
||||
- ansible_connection != 'chroot'
|
||||
|
||||
# Due to ansible bug 21026, cannot use service module on RHEL 7
|
||||
|
@ -43,5 +43,5 @@
|
|||
when:
|
||||
- ansible_connection == 'chroot'
|
||||
- ansible_facts['os_family'] == 'RedHat'
|
||||
- ansible_facts['distribution_major_version']|int >= 7
|
||||
- ansible_facts['distribution_major_version'] | int >= 7
|
||||
changed_when: true
|
||||
|
|
|
@ -38,6 +38,6 @@
|
|||
changed_when: false
|
||||
when:
|
||||
- __sshd_test_backup is defined
|
||||
- ansible_facts['virtualization_type']|default(None) not in __sshd_skip_virt_env
|
||||
- ansible_facts['virtualization_type'] | default(None) not in __sshd_skip_virt_env
|
||||
- ansible_connection != 'chroot'
|
||||
- ansible_facts['os_family'] != 'AIX'
|
||||
|
|
|
@ -57,5 +57,5 @@
|
|||
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) or
|
||||
(ansible_facts['distribution'] == 'Ubuntu' and ansible_facts['distribution_major_version']|int >= 22)
|
||||
- (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] | int > 8) or
|
||||
(ansible_facts['distribution'] == 'Ubuntu' and ansible_facts['distribution_major_version'] | int >= 22)
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
- "'AuthorizedKeysFile .ssh/authorized_keys' in config.content | b64decode"
|
||||
when:
|
||||
- ansible_facts['os_family'] == 'RedHat'
|
||||
- ansible_facts['distribution_major_version']|int > 8
|
||||
- ansible_facts['distribution_major_version'] | int > 8
|
||||
|
||||
- name: Check RHEL7 and RHEL8 defaults are present in the first configuration file
|
||||
ansible.builtin.assert:
|
||||
|
@ -114,8 +114,8 @@
|
|||
- "'UsePAM yes' in config.content | b64decode"
|
||||
when:
|
||||
- ansible_facts['os_family'] == 'RedHat'
|
||||
- ansible_facts['distribution_major_version']|int > 6
|
||||
- ansible_facts['distribution_major_version']|int < 9
|
||||
- ansible_facts['distribution_major_version'] | int > 6
|
||||
- ansible_facts['distribution_major_version'] | int < 9
|
||||
|
||||
- name: Check RHEL6 defaults are present in the first configuration file
|
||||
ansible.builtin.assert:
|
||||
|
@ -133,7 +133,7 @@
|
|||
- "'UsePAM yes' in config.content | b64decode"
|
||||
when:
|
||||
- ansible_facts['os_family'] == 'Debian'
|
||||
- ansible_facts['distribution_major_version']|int < 22
|
||||
- ansible_facts['distribution_major_version'] | int < 22
|
||||
|
||||
- name: Check Ubuntu 22 defaults are present in the first configuration file
|
||||
ansible.builtin.assert:
|
||||
|
@ -143,7 +143,7 @@
|
|||
- "'UsePAM yes' in config.content | b64decode"
|
||||
when:
|
||||
- ansible_facts['distribution'] == 'Ubuntu'
|
||||
- ansible_facts['distribution_major_version']|int >= 22
|
||||
- ansible_facts['distribution_major_version'] | int >= 22
|
||||
|
||||
- name: Check content of second configuration file
|
||||
ansible.builtin.assert:
|
||||
|
@ -172,7 +172,7 @@
|
|||
- "'Subsystem sftp /usr/libexec/openssh/sftp-server' in config3.content | b64decode"
|
||||
when:
|
||||
- ansible_facts['os_family'] == 'RedHat'
|
||||
- ansible_facts['distribution_major_version']|int > 8
|
||||
- ansible_facts['distribution_major_version'] | int > 8
|
||||
- ansible_facts['distribution'] != 'Fedora'
|
||||
|
||||
- name: Check the main configuration file contains some default values for Fedora
|
||||
|
@ -183,7 +183,7 @@
|
|||
- "'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_major_version'] | int > 8
|
||||
- ansible_facts['distribution'] == 'Fedora'
|
||||
|
||||
- name: Check the generated config has requested properties
|
||||
|
|
|
@ -122,7 +122,7 @@
|
|||
- "'AuthorizedKeysFile .ssh/authorized_keys' in config.content | b64decode"
|
||||
when:
|
||||
- ansible_facts['os_family'] == 'RedHat'
|
||||
- ansible_facts['distribution_major_version']|int > 8
|
||||
- ansible_facts['distribution_major_version'] | int > 8
|
||||
|
||||
- name: Check RHEL7 and RHEL8 defaults are present in the first configuration file
|
||||
ansible.builtin.assert:
|
||||
|
@ -132,8 +132,8 @@
|
|||
- "'UsePAM yes' in config.content | b64decode"
|
||||
when:
|
||||
- ansible_facts['os_family'] == 'RedHat'
|
||||
- ansible_facts['distribution_major_version']|int > 6
|
||||
- ansible_facts['distribution_major_version']|int < 9
|
||||
- ansible_facts['distribution_major_version'] | int > 6
|
||||
- ansible_facts['distribution_major_version'] | int < 9
|
||||
|
||||
- name: Check RHEL6 defaults are present in the first configuration file
|
||||
ansible.builtin.assert:
|
||||
|
@ -151,7 +151,7 @@
|
|||
- "'UsePAM yes' in config.content | b64decode"
|
||||
when:
|
||||
- ansible_facts['os_family'] == 'Debian'
|
||||
- ansible_facts['distribution_major_version']|int < 22
|
||||
- ansible_facts['distribution_major_version'] | int < 22
|
||||
|
||||
- name: Check Ubuntu 22 defaults are present in the first configuration file
|
||||
ansible.builtin.assert:
|
||||
|
@ -161,8 +161,7 @@
|
|||
- "'UsePAM yes' in config.content | b64decode"
|
||||
when:
|
||||
- ansible_facts['distribution'] == 'Ubuntu'
|
||||
- ansible_facts['distribution_major_version']|int >= 22
|
||||
|
||||
- ansible_facts['distribution_major_version'] | int >= 22
|
||||
|
||||
- name: Check content of second configuration file
|
||||
ansible.builtin.assert:
|
||||
|
@ -191,7 +190,7 @@
|
|||
- "'Subsystem sftp /usr/libexec/openssh/sftp-server' in config3.content | b64decode"
|
||||
when:
|
||||
- ansible_facts['os_family'] == 'RedHat'
|
||||
- ansible_facts['distribution_major_version']|int > 8
|
||||
- ansible_facts['distribution_major_version'] | int > 8
|
||||
- ansible_facts['distribution'] != 'Fedora'
|
||||
|
||||
- name: Check the main configuration file contains some default values for Fedora
|
||||
|
@ -202,7 +201,7 @@
|
|||
- "'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_major_version'] | int > 8
|
||||
- ansible_facts['distribution'] == 'Fedora'
|
||||
|
||||
- name: Check the generated config has requested properties
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
when:
|
||||
- ansible_facts['os_family'] == "RedHat"
|
||||
- ansible_facts['distribution'] != 'Fedora'
|
||||
- ansible_facts['distribution_major_version']|int < 9
|
||||
- ansible_facts['distribution_major_version'] | int < 9
|
||||
block:
|
||||
- name: Flush handlers
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
|
Loading…
Reference in a new issue