From f5293c016dda4b8e82518a3444e80efe9b7d3cf0 Mon Sep 17 00:00:00 2001 From: Jesper Hess Nielsen Date: Thu, 17 Dec 2020 08:43:24 +0100 Subject: [PATCH] Change YAML to use lists instead of comma-separated strings for domains because it looks nicer --- roles/docker/defaults/main.yml | 22 ++++++++++++++----- roles/docker/tasks/services/matrix_riot.yml | 4 ++-- .../tasks/services/ulovliglogning-dk.yml | 4 ++-- roles/docker/tasks/services/websites.yml | 16 +++++++------- 4 files changed, 28 insertions(+), 18 deletions(-) diff --git a/roles/docker/defaults/main.yml b/roles/docker/defaults/main.yml index 8b39d04..7229a00 100644 --- a/roles/docker/defaults/main.yml +++ b/roles/docker/defaults/main.yml @@ -28,7 +28,9 @@ matrix: volume_folder: "{{ volume_root_folder }}/matrix" riot: - domain: "riot.{{ base_domain }},element.{{ base_domain }}" + domains: + - "riot.{{ base_domain }}" + - "element.{{ base_domain }}" volume_folder: "{{ volume_root_folder }}/riot" privatebin: @@ -49,16 +51,25 @@ docker_registry: password: "{{ docker_password }}" data_coop_website: - domain: "{{ base_domain }},www.{{ base_domain }}" + domains: + - "{{ base_domain }}" + - "www.{{ base_domain }}" cryptohagen_website: - domain: "cryptohagen.dk,www.cryptohagen.dk" + domains: + - "cryptohagen.dk" + - "www.cryptohagen.dk" ulovliglogning_website: - domain: "ulovliglogning.dk,www.ulovliglogning.dk,ulovlig-logning.dk" + domains: + - "ulovliglogning.dk" + - "www.ulovliglogning.dk" + - "ulovlig-logning.dk" cryptoaarhus_website: - domain: "cryptoaarhus.dk,www.cryptoaarhus.dk" + domains: + - "cryptoaarhus.dk" + - "www.cryptoaarhus.dk" drone: domain: "drone.{{ base_domain }}" @@ -78,4 +89,3 @@ portainer: ttrss: domain: rss.{{ base_domain }} volume_folder: "{{ volume_root_folder }}/tt-rss" - diff --git a/roles/docker/tasks/services/matrix_riot.yml b/roles/docker/tasks/services/matrix_riot.yml index 1d25d34..f06d91e 100644 --- a/roles/docker/tasks/services/matrix_riot.yml +++ b/roles/docker/tasks/services/matrix_riot.yml @@ -112,9 +112,9 @@ volumes: - "{{ riot.volume_folder }}/data:/data" environment: - VIRTUAL_HOST: "{{ riot.domain }}" + VIRTUAL_HOST: "{{ riot.domains|join(',') }}" VIRTUAL_PORT: "8080" - LETSENCRYPT_HOST: "{{ riot.domain }}" + LETSENCRYPT_HOST: "{{ riot.domains|join(',') }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" networks: diff --git a/roles/docker/tasks/services/ulovliglogning-dk.yml b/roles/docker/tasks/services/ulovliglogning-dk.yml index 19ba9db..7ae903f 100644 --- a/roles/docker/tasks/services/ulovliglogning-dk.yml +++ b/roles/docker/tasks/services/ulovliglogning-dk.yml @@ -6,8 +6,8 @@ networks: - name: external_services env: - VIRTUAL_HOST: "{{ ulovliglogning_website.domain }}" - LETSENCRYPT_HOST: "{{ ulovliglogning_website.domain }}" + VIRTUAL_HOST: "{{ ulovliglogning_website.domains|join(',') }}" + LETSENCRYPT_HOST: "{{ ulovliglogning_website.domains|join(',') }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" labels: com.ouroboros.enable: "true" diff --git a/roles/docker/tasks/services/websites.yml b/roles/docker/tasks/services/websites.yml index dc7d18d..0d99509 100644 --- a/roles/docker/tasks/services/websites.yml +++ b/roles/docker/tasks/services/websites.yml @@ -8,8 +8,8 @@ networks: - name: external_services env: - VIRTUAL_HOST : "{{ data_coop_website.domain }}" - LETSENCRYPT_HOST: "{{ data_coop_website.domain }}" + VIRTUAL_HOST : "{{ data_coop_website.domains|join(',') }}" + LETSENCRYPT_HOST: "{{ data_coop_website.domains|join(',') }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" labels: com.ouroboros.enable: "true" @@ -22,8 +22,8 @@ networks: - name: external_services env: - VIRTUAL_HOST : "new.{{ data_coop_website.domain }}" - LETSENCRYPT_HOST: "new.{{ data_coop_website.domain }}" + VIRTUAL_HOST : "new.{{ data_coop_website.domains|join(',') }}" + LETSENCRYPT_HOST: "new.{{ data_coop_website.domains|join(',') }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" labels: com.ouroboros.enable: "true" @@ -36,8 +36,8 @@ networks: - name: external_services env: - VIRTUAL_HOST : "{{ cryptohagen_website.domain }}" - LETSENCRYPT_HOST: "{{ cryptohagen_website.domain }}" + VIRTUAL_HOST : "{{ cryptohagen_website.domains|join(',') }}" + LETSENCRYPT_HOST: "{{ cryptohagen_website.domains|join(',') }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" labels: com.ouroboros.enable: "true" @@ -50,8 +50,8 @@ networks: - name: external_services env: - VIRTUAL_HOST : "{{ cryptoaarhus_website.domain }}" - LETSENCRYPT_HOST: "{{ cryptoaarhus_website.domain }}" + VIRTUAL_HOST : "{{ cryptoaarhus_website.domains|join(',') }}" + LETSENCRYPT_HOST: "{{ cryptoaarhus_website.domains|join(',') }}" LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}" labels: com.ouroboros.enable: "true" -- 2.43.4