Skip to content

Commit

Permalink
swap: exclude for containers
Browse files Browse the repository at this point in the history
Exclude for containers ('docker', 'lxc', 'podman') to prevent test failures in CI.
  • Loading branch information
vitabaks committed Mar 1, 2023
1 parent 775c80c commit a6dd4df
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
set_fact:
firewall_enabled_at_boot: false
firewall_enable_ipv6: false # Added to prevent test failures in CI.
swap_file_create: false # Added to prevent test failures in CI.
sysctl_set: false # Added to prevent test failures in CI.
nameservers: ["8.8.8.8", "9.9.9.9"]
with_haproxy_load_balancing: true
Expand Down
1 change: 0 additions & 1 deletion molecule/postgrespro/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
- name: Set variables for molecule
set_fact:
firewall_enable_ipv6: false # Added to prevent test failures in CI.
swap_file_create: false # Added to prevent test failures in CI.
sysctl_set: false # Added to prevent test failures in CI.
nameservers: ["8.8.8.8", "9.9.9.9"]
with_haproxy_load_balancing: true
Expand Down
4 changes: 3 additions & 1 deletion roles/swap/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
command: swapon --show=SIZE --bytes --noheadings
register: swap_exists
changed_when: false
when: swap_file_create|bool
when:
- swap_file_create | bool
- ansible_virtualization_type not in ['docker', 'lxc', 'podman'] # exclude for containers to prevent test failures in CI.
tags: swap, swap_create, swap_remove

- name: Swap exists
Expand Down

0 comments on commit a6dd4df

Please sign in to comment.