From 6da553c3087c7c767474919b1428270913e17340 Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Wed, 17 Feb 2021 19:17:50 -0500 Subject: [PATCH] Fix tasks/postfix.yaml and roles/basic/tasks/postfix.yaml to match Found the reason that the definitions I had put were not working. There were two different ones and i was looking at the wrong one. Put the two tasks with the same logic so things should work no matter which one is run. --- roles/base/tasks/postfix.yml | 2 ++ tasks/postfix_basic.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/roles/base/tasks/postfix.yml b/roles/base/tasks/postfix.yml index c13104c4f1..a5f7524baf 100644 --- a/roles/base/tasks/postfix.yml +++ b/roles/base/tasks/postfix.yml @@ -1,6 +1,8 @@ - name: /etc/postfix/main.cf copy: src={{ item }} dest=/etc/postfix/main.cf with_first_found: + - "{{ postfix_maincf }}" + - "postfix/main.cf/main.cf.{{ ansible_fqdn }}" - "postfix/main.cf/main.cf.{{ inventory_hostname }}" - "postfix/main.cf/main.cf.{{ host_group }}" - "postfix/main.cf/main.cf.{{ postfix_group }}" diff --git a/tasks/postfix_basic.yml b/tasks/postfix_basic.yml index 2688861d4e..4bd6a7dcb1 100644 --- a/tasks/postfix_basic.yml +++ b/tasks/postfix_basic.yml @@ -12,6 +12,7 @@ - "{{ roles_path }}/base/files/postfix/main.cf/main.cf.{{ inventory_hostname }}" - "{{ roles_path }}/base/files/postfix/main.cf/main.cf.{{ host_group }}" - "{{ roles_path }}/base/files/postfix/main.cf/main.cf.{{ postfix_group }}" + - "{{ roles_path }}/base/files/postfix/main.cf/main.cf.{{ datacenter }}" - "{{ roles_path }}/base/files/postfix/main.cf/main.cf" notify: - restart postfix