From f5bc79e6365d0b2ac9ade9dc39915e1987bee754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Sat, 2 Mar 2019 23:25:07 +0100 Subject: [PATCH] Add network. --- roles/docker/defaults/main.yml | 3 +++ roles/docker/tasks/services/mailu.yml | 6 ++++++ roles/docker/templates/mailu.env | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) 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