From ec8c05f11687daabb544dd2e538fb37cf3592612 Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Feb 18 2021 00:17:50 +0000 Subject: 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. --- diff --git a/roles/base/tasks/postfix.yml b/roles/base/tasks/postfix.yml index c13104c..a5f7524 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 2688861..4bd6a7d 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