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.
This commit is contained in:
Stephen Smoogen 2021-02-17 19:17:50 -05:00
parent 7def09120e
commit ec8c05f116
2 changed files with 3 additions and 0 deletions

View file

@ -1,6 +1,8 @@
- name: /etc/postfix/main.cf - name: /etc/postfix/main.cf
copy: src={{ item }} dest=/etc/postfix/main.cf copy: src={{ item }} dest=/etc/postfix/main.cf
with_first_found: with_first_found:
- "{{ postfix_maincf }}"
- "postfix/main.cf/main.cf.{{ ansible_fqdn }}"
- "postfix/main.cf/main.cf.{{ inventory_hostname }}" - "postfix/main.cf/main.cf.{{ inventory_hostname }}"
- "postfix/main.cf/main.cf.{{ host_group }}" - "postfix/main.cf/main.cf.{{ host_group }}"
- "postfix/main.cf/main.cf.{{ postfix_group }}" - "postfix/main.cf/main.cf.{{ postfix_group }}"

View file

@ -12,6 +12,7 @@
- "{{ roles_path }}/base/files/postfix/main.cf/main.cf.{{ inventory_hostname }}" - "{{ 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.{{ host_group }}"
- "{{ roles_path }}/base/files/postfix/main.cf/main.cf.{{ postfix_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" - "{{ roles_path }}/base/files/postfix/main.cf/main.cf"
notify: notify:
- restart postfix - restart postfix