Skip to content

Commit

Permalink
Updated to prevent changes when running in containers
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristan Stevens committed Nov 24, 2021
1 parent 1b5b3c4 commit a515d8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roles/prereqs/os/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
loop: "{{ kernel_flags }}"
loop_control:
loop_var: flag
when: not(ansible_virtualization_type == "docker" and ansible_virtualization_role == "guest")
when: not((ansible_virtualization_type == "docker" or ansible_virtualization_type == "container") and ansible_virtualization_role == "guest")

- name: Populate service facts
service_facts:
Expand Down Expand Up @@ -103,4 +103,4 @@
- name: Apply OS-specific configurations
include_tasks:
file: "main-{{ ansible_os_family }}.yml"
when: not(ansible_virtualization_type == "docker" and ansible_virtualization_role == "guest")
when: not((ansible_virtualization_type == "docker" or ansible_virtualization_type == "container") and ansible_virtualization_role == "guest")

0 comments on commit a515d8d

Please sign in to comment.