Automatically determine the need for shared Docker network
This commit is contained in:
parent
f9101e319f
commit
ba53b23e2e
|
@ -4,5 +4,3 @@
|
|||
apps_include:
|
||||
- minecraft
|
||||
- watchtower
|
||||
|
||||
apps_create_shared_docker_network: false
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue