From 09f2c6a99938d5ec98a24f8a1e4d4fa1467373a3 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Wed, 6 Apr 2022 16:43:20 +0200 Subject: [PATCH] Add another virtualization platform exception Signed-off-by: Jakub Jelen --- handlers/main.yml | 2 ++ tasks/install.yml | 2 ++ tests/tasks/restore.yml | 2 ++ 3 files changed, 6 insertions(+) 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'