diff --git a/roles/docker/defaults/main.yml b/roles/docker/defaults/main.yml index 74d66fa..295631b 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 6d17acc..d9af652 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 527fa76..7e00627 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