mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-11-25 12:30:19 +01:00
Reuse the list of skipped virtualization environments
This commit is contained in:
parent
7e311e19a9
commit
c1d1cdfeac
4 changed files with 19 additions and 18 deletions
|
@ -81,3 +81,11 @@ __sshd_sysconfig_supports_use_strong_rng: false
|
|||
|
||||
__sshd_runtime_directory: false
|
||||
__sshd_runtime_directory_mode: "0755"
|
||||
|
||||
__sshd_skip_virt_env:
|
||||
- kvm
|
||||
- docker
|
||||
- podman
|
||||
- container
|
||||
- containerd
|
||||
- VirtualPC
|
||||
|
|
|
@ -6,12 +6,7 @@
|
|||
state: reloaded
|
||||
when:
|
||||
- sshd_allow_reload|bool
|
||||
- ansible_virtualization_type|default(None) != 'kvm'
|
||||
- ansible_virtualization_type|default(None) != 'docker'
|
||||
- ansible_virtualization_type|default(None) != 'podman'
|
||||
- ansible_virtualization_type|default(None) != 'container'
|
||||
- ansible_virtualization_type|default(None) != 'containerd'
|
||||
- ansible_virtualization_type|default(None) != 'VirtualPC' # for Github Actions
|
||||
- ansible_virtualization_type|default(None) not in __sshd_skip_virt_env
|
||||
- ansible_connection != 'chroot'
|
||||
- ansible_os_family != 'AIX'
|
||||
listen: reload_sshd
|
||||
|
|
|
@ -217,12 +217,7 @@
|
|||
state: started
|
||||
when:
|
||||
- sshd_manage_service|bool
|
||||
- ansible_virtualization_type|default(None) != 'kvm'
|
||||
- ansible_virtualization_type|default(None) != 'docker'
|
||||
- ansible_virtualization_type|default(None) != 'podman'
|
||||
- ansible_virtualization_type|default(None) != 'container'
|
||||
- ansible_virtualization_type|default(None) != 'containerd'
|
||||
- ansible_virtualization_type|default(None) != 'VirtualPC' # for Github Actions
|
||||
- ansible_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
|
||||
|
|
|
@ -30,13 +30,16 @@
|
|||
name: sshd
|
||||
state: reloaded
|
||||
changed_when: false
|
||||
vars:
|
||||
__sshd_skip_virt_env:
|
||||
- kvm
|
||||
- docker
|
||||
- podman
|
||||
- container
|
||||
- containerd
|
||||
- VirtualPC
|
||||
when:
|
||||
- __sshd_test_backup is defined
|
||||
- ansible_virtualization_type|default(None) != 'kvm'
|
||||
- ansible_virtualization_type|default(None) != 'docker'
|
||||
- ansible_virtualization_type|default(None) != 'podman'
|
||||
- ansible_virtualization_type|default(None) != 'container' # new podman
|
||||
- ansible_virtualization_type|default(None) != 'containerd'
|
||||
- ansible_virtualization_type|default(None) != 'VirtualPC' # for Github Actions
|
||||
- ansible_virtualization_type|default(None) not in __sshd_skip_virt_env
|
||||
- ansible_connection != 'chroot'
|
||||
- ansible_os_family != 'AIX'
|
||||
|
|
Loading…
Reference in a new issue