diff --git a/roles/docker/defaults/main.yml b/roles/docker/defaults/main.yml index 74d66fa9..295631b5 100644 --- a/roles/docker/defaults/main.yml +++ b/roles/docker/defaults/main.yml @@ -48,3 +48,6 @@ data_coop_website: cryptohagen_website: domain: "cryptohagen.dk" + +mailu: + subnet: 192.168.203.0/24 diff --git a/roles/docker/tasks/services/mailu.yml b/roles/docker/tasks/services/mailu.yml index 6d17acc3..d9af6520 100644 --- a/roles/docker/tasks/services/mailu.yml +++ b/roles/docker/tasks/services/mailu.yml @@ -1,5 +1,11 @@ --- +- name: setup network for mailu + docker_network: + name: mailu + ipam_options: + subnet: "{{ mailu.subnet }}" + - name: create mailu volume folders file: name: "{{ mailu.volume_folder }}/{{ volume }}" diff --git a/roles/docker/templates/mailu.env b/roles/docker/templates/mailu.env index 527fa76e..7e006273 100644 --- a/roles/docker/templates/mailu.env +++ b/roles/docker/templates/mailu.env @@ -26,7 +26,7 @@ SECRET_KEY={{ mailu_secret_key }} # PUBLIC_IPV6= ::1 (default: ::1) # Subnet of the docker network. This should not conflict with any networks to which your system is connected. (Internal and external!) -SUBNET=192.168.203.0/24 +SUBNET={{ mailu.subnet }} # Main mail domain DOMAIN=data.coop