diff --git a/roles/traefik/defaults/main.yml b/roles/traefik/defaults/main.yml index c87f45e..3a67c5c 100644 --- a/roles/traefik/defaults/main.yml +++ b/roles/traefik/defaults/main.yml @@ -127,3 +127,6 @@ traefik_selinux_enabled: true # The SELinux levels for tor/traefiks folders/container traefik_selinux_level: "{{ omit }}" traefik_tor_selinux_level: "{{ omit }}" + +# Enable or disable firewalld handling (Allowing HTTP/HTTPS and trusting the docker network if necessary) +traefik_firewalld_enabled: true diff --git a/roles/traefik/tasks/main.yml b/roles/traefik/tasks/main.yml index 74bd65f..d6dad15 100644 --- a/roles/traefik/tasks/main.yml +++ b/roles/traefik/tasks/main.yml @@ -99,6 +99,7 @@ tags: - firewall when: + - traefik_firewalld_enabled - docker_package in ansible_facts.packages - ansible_facts.packages[docker_package][0].version is version('20.10', '<') @@ -151,6 +152,8 @@ - http - https become: true + when: + - traefik_firewalld_enabled tags: - firewall @@ -181,6 +184,7 @@ - 80 - 443 when: + - traefik_firewalld_enabled - traefik_ipv6 is defined - traefik_ipv6.enabled - traefik_ipv6.ip_addr is defined @@ -213,6 +217,7 @@ - 80 - 443 when: + - traefik_firewalld_enabled - traefik_ipv6 is defined - traefik_ipv6.enabled - traefik_ipv6.ip_addr is defined