traefik: Only trust network for docker < 20.10

Docker complains about the network being already marked as trusted otherwise.
Also an upgrade to docker 20.10 requires manual recreation of the networks and a removal of the docker-proxy network via `firewall-cmd --zone=trusted --remove-interface=docker-proxy`.
This commit is contained in:
saibotk 2020-12-10 19:39:13 +01:00
parent 9ddb807db9
commit 9e86ae3bba
No known key found for this signature in database
GPG key ID: A3299C587D5DF523
2 changed files with 12 additions and 0 deletions

View file

@ -17,6 +17,10 @@ Role Variables
**Note: Lines that are commented out via `#` are usually still valid/used variables, but they are not defined by default, so they might enable a feature, when uncommenting/defining them!**
### Global variables, that are used:
- `docker_package`: Defined by the docker role, this is the package name of docker within your package manager.
Dependencies
------------

View file

@ -81,6 +81,11 @@
- traefik_ipv6 is defined
- traefik_ipv6.enabled
- name: Gather the package facts
package_facts:
manager: auto
# This step is only needed in docker < 20.10, as docker does this by default now
- name: Trust our proxy network
ansible.posix.firewalld:
zone: trusted
@ -91,6 +96,9 @@
become: true
tags:
- firewall
when:
- docker_package in ansible_facts.packages
- ansible_facts.packages[docker_package][0].version is version('20.10', '<')
- name: Deploy dynamic_conf.yml
template: