diff --git a/group_vars/all/10_networks.yml b/group_vars/all/10_networks.yml index efd8e48b..893537a3 100644 --- a/group_vars/all/10_networks.yml +++ b/group_vars/all/10_networks.yml @@ -4,6 +4,7 @@ defaults_networks: ip6: "::01" # Change this in inventory to the ip address of your server local: mailu: - dns: 192.168.203.254 # Address of the Mailu DNS server + dns: 192.168.203.254 # Address of the Mailu DNS server + subnet: 192.168.203.0/24 # Mailu Subnet \ No newline at end of file diff --git a/roles/docker-mailu/templates/docker-compose.yml.j2 b/roles/docker-mailu/templates/docker-compose.yml.j2 index 0746d842..fd83f751 100644 --- a/roles/docker-mailu/templates/docker-compose.yml.j2 +++ b/roles/docker-mailu/templates/docker-compose.yml.j2 @@ -204,7 +204,7 @@ services: ipam: driver: default config: - - subnet: {{applications.mailu.subnet}} + - subnet: {{networks.local.mailu.subnet}} radicale: driver: bridge webmail: diff --git a/roles/docker-mailu/templates/env.j2 b/roles/docker-mailu/templates/env.j2 index 3e9176e9..4fb32d42 100644 --- a/roles/docker-mailu/templates/env.j2 +++ b/roles/docker-mailu/templates/env.j2 @@ -15,7 +15,7 @@ LD_PRELOAD=/usr/lib/libhardened_malloc.so SECRET_KEY={{mailu_secret_key}} # Subnet of the docker network. This should not conflict with any networks to which your system is connected. (Internal and external!) -SUBNET={{applications.mailu.subnet}} +SUBNET={{networks.local.mailu.subnet}} # Main mail domain DOMAIN={{applications.mailu.domain}}