diff --git a/handlers/main.yml b/handlers/main.yml index 6b2f580..e2b4902 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -6,8 +6,10 @@ 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_connection != 'chroot' diff --git a/tasks/install.yml b/tasks/install.yml index f1d8455..7e4d9f0 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -211,8 +211,10 @@ 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_connection != 'chroot' diff --git a/tests/tasks/restore.yml b/tests/tasks/restore.yml index 1d16ad3..da65a5e 100644 --- a/tests/tasks/restore.yml +++ b/tests/tasks/restore.yml @@ -32,8 +32,10 @@ changed_when: false 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_connection != 'chroot'