Automatically determine the need for shared Docker network

This commit is contained in:
Sam A. 2024-08-09 17:23:40 +02:00
parent f9101e319f
commit ba53b23e2e
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA
2 changed files with 1 additions and 3 deletions

View file

@ -4,5 +4,3 @@
apps_include:
- minecraft
- watchtower
apps_create_shared_docker_network: false

View file

@ -8,7 +8,7 @@
ipam_config:
- subnet: 172.17.2.0/24
- subnet: fd02::/64
state: "{{ 'present' if apps_create_shared_docker_network is undefined or apps_create_shared_docker_network else 'absent' }}"
state: "{{ 'present' if 'caddy' in apps_include or 'nginx' in apps_include else 'absent' }}"
- name: Create Docker network for Postfix
community.docker.docker_network: