From e45eb022082a71f23ede56e79681ab7c62c57e85 Mon Sep 17 00:00:00 2001 From: reynir Date: Sun, 27 Nov 2022 14:01:55 +0000 Subject: [PATCH] Don't hardcode domains (#129) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Reynir Björnsson Reviewed-on: https://git.data.coop/data.coop/ansible/pulls/129 Co-authored-by: reynir Co-committed-by: reynir --- roles/docker/defaults/main.yml | 1 + roles/docker/tasks/services/postfix.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/docker/defaults/main.yml b/roles/docker/defaults/main.yml index 2a23950..2acddce 100644 --- a/roles/docker/defaults/main.yml +++ b/roles/docker/defaults/main.yml @@ -6,6 +6,7 @@ services: ### Internal services ### postfix: file: postfix.yml + domain: "smtp.{{ base_domain }}" version: "v3.5.0" nginx_proxy: diff --git a/roles/docker/tasks/services/postfix.yml b/roles/docker/tasks/services/postfix.yml index 77dc727..1fb67df 100644 --- a/roles/docker/tasks/services/postfix.yml +++ b/roles/docker/tasks/services/postfix.yml @@ -17,4 +17,4 @@ env: # Get all services which have allowed_sender_domain defined ALLOWED_SENDER_DOMAINS: "{{ services | dict2items | selectattr('value.allowed_sender_domain', 'true') | map(attribute='value.domain') | join(' ') }}" - HOSTNAME: "smtp.{{ base_domain }}" # the name the smtp server will identify itself as + HOSTNAME: "{{ services.postfix.domain }}" # the name the smtp server will identify itself as