improve container checks

Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
Mark Bolwell 2025-04-11 11:40:04 +01:00
parent 9ac5740127
commit 7f0291fbf2
No known key found for this signature in database
GPG Key ID: 997FF7FE93AEB5B9
1 changed files with 2 additions and 1 deletions

View File

@ -65,7 +65,8 @@
- name: Setup rules if container - name: Setup rules if container
when: when:
- ansible_connection == 'docker' or - ansible_connection == 'docker' or
ansible_facts.virtualization_type in ["docker", "lxc", "openvz", "podman", "container"] (ansible_facts.virtualization_type is defined and
ansible_facts.virtualization_type in ["docker", "lxc", "openvz", "podman", "container"])
tags: always tags: always
block: block:
- name: Discover and set container variable if required - name: Discover and set container variable if required