2016-04-09 19:37:13 +02:00
|
|
|
- name: /etc/postfix/main.cf
|
|
|
|
copy: src={{ item }} dest=/etc/postfix/main.cf
|
|
|
|
with_first_found:
|
|
|
|
- "{{ postfix_maincf }}"
|
2016-05-11 15:08:50 +00:00
|
|
|
- "postfix/main.cf/main.cf.{{ inventory_hostname }}"
|
2016-04-09 19:37:13 +02:00
|
|
|
- "postfix/main.cf/main.cf.{{ host_group }}"
|
|
|
|
- "postfix/main.cf/main.cf.{{ postfix_group }}"
|
|
|
|
- "postfix/main.cf/main.cf.{{ datacenter }}"
|
|
|
|
- "postfix/main.cf/main.cf"
|
|
|
|
notify:
|
|
|
|
- restart postfix
|
|
|
|
tags:
|
|
|
|
- postfix
|
|
|
|
- config
|
|
|
|
- base
|
|
|
|
|
|
|
|
- name: install /etc/postfix/master.cf file
|
|
|
|
copy: src={{ item }} dest=/etc/postfix/master.cf mode=0644
|
|
|
|
with_first_found:
|
|
|
|
- "{{ postfix_mastercf }}"
|
|
|
|
- "postfix/master.cf/master.cf.{{ inventory_hostname }}"
|
|
|
|
- "postfix/master.cf/master.cf.{{ host_group }}"
|
|
|
|
- "postfix/master.cf/master.cf.{{ postfix_group }}"
|
|
|
|
- "postfix/master.cf/master.cf"
|
2016-05-14 17:49:50 +00:00
|
|
|
when: inventory_hostname.startswith('smtp-mm') or inventory_hostname.startswith('mailman')
|
2016-04-09 19:37:13 +02:00
|
|
|
notify:
|
|
|
|
- restart postfix
|
|
|
|
tags:
|
|
|
|
- postfix
|
|
|
|
- config
|
|
|
|
- base
|
|
|
|
|
|
|
|
- name: enable postfix to start
|
|
|
|
service: name=postfix state=running enabled=true
|
|
|
|
tags:
|
|
|
|
- service
|
|
|
|
- base
|
|
|
|
|
|
|
|
- name: install /etc/postfix/transport file
|
|
|
|
copy: src="postfix/{{ postfix_transport_filename }}" dest=/etc/postfix/transport
|
2016-09-24 00:41:31 +00:00
|
|
|
when: inventory_hostname.startswith(('smtp-mm','bastion','noc02'))
|
2016-04-09 19:37:13 +02:00
|
|
|
notify:
|
|
|
|
- restart postfix
|
|
|
|
- rebuild postfix transport
|
|
|
|
tags:
|
|
|
|
- postfix
|
|
|
|
- base
|
|
|
|
- config
|
|
|
|
|
|
|
|
|