update logic for container checks

This commit is contained in:
Chris Hammer 2023-12-11 12:56:20 -05:00
parent 0d71a1adcb
commit b3deb05555
4 changed files with 4 additions and 10 deletions

View File

@ -8,7 +8,7 @@ namespace: jchristianh
name: baseos name: baseos
# The version of the collection. Must be compatible with semantic versioning # The version of the collection. Must be compatible with semantic versioning
version: 1.0.16 version: 1.0.17
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection # The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md readme: README.md

View File

@ -3,9 +3,7 @@
set_fact: set_fact:
__etc_hosts_file: "{{ __etc_hosts_file }}.docker" __etc_hosts_file: "{{ __etc_hosts_file }}.docker"
when: when:
- ansible_virtualization_type == "docker" or - ansible_virtualization_type | regex_search("docker|podman|container")
ansible_virtualization_type == "podman" or
ansible_virtualization_type == "container"
- name: Deploy {{ __etc_hosts_file }} - name: Deploy {{ __etc_hosts_file }}

View File

@ -3,9 +3,7 @@
ansible.builtin.set_fact: ansible.builtin.set_fact:
__resolv_conf_file: "{{ __resolv_conf_file_docker }}" __resolv_conf_file: "{{ __resolv_conf_file_docker }}"
when: when:
- ansible_virtualization_type == "docker" or - ansible_virtualization_type | regex_search("docker|podman|container")
ansible_virtualization_type == "podman" or
ansible_virtualization_type == "container"
- name: Deploy {{ __resolv_conf_file }} - name: Deploy {{ __resolv_conf_file }}

View File

@ -4,6 +4,4 @@
name : snmpd name : snmpd
state: restarted state: restarted
when: when:
- ansible_virtualization_type == "docker" or - ansible_virtualization_type | regex_search("docker|podman|container")
ansible_virtualization_type == "podman" or
ansible_virtualization_type == "container"