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-09-24 00:51:05 +00:00
|
|
|
when: inventory_hostname.startswith(('smtp-mm', 'mailman', 'noc02'))
|
2016-04-09 19:37:13 +02:00
|
|
|
notify:
|
|
|
|
- restart postfix
|
|
|
|
tags:
|
|
|
|
- postfix
|
|
|
|
- config
|
|
|
|
- base
|
|
|
|
|
|
|
|
- name: enable postfix to start
|
2017-04-13 01:37:21 +00:00
|
|
|
service: name=postfix state=started enabled=true
|
2016-04-09 19:37:13 +02:00
|
|
|
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:
|
2016-09-27 16:09:32 +00:00
|
|
|
- rebuild postfix transport
|
2016-09-27 16:35:29 +00:00
|
|
|
- restart postfix
|
2016-04-09 19:37:13 +02:00
|
|
|
tags:
|
|
|
|
- postfix
|
|
|
|
- base
|
|
|
|
- config
|
|
|
|
|
2016-09-27 03:00:03 +00:00
|
|
|
- name: create /etc/postfix/tls_policy
|
|
|
|
copy: src="postfix/tls_policy" dest=/etc/postfix/tls_policy
|
2016-09-27 17:37:21 +00:00
|
|
|
when: inventory_hostname.startswith(('bastion','smtp-mm'))
|
2016-09-27 03:08:25 +00:00
|
|
|
notify:
|
|
|
|
- rebuild postfix tls_policy
|
2016-09-27 03:34:39 +00:00
|
|
|
- restart postfix
|
2016-09-27 03:00:03 +00:00
|
|
|
tags:
|
|
|
|
- postfix
|
|
|
|
|
2016-09-27 03:25:37 +00:00
|
|
|
- name: install /etc/pki/tls/certs/gateway.crt
|
2016-09-27 01:46:38 +00:00
|
|
|
copy:
|
2016-09-27 18:15:04 +00:00
|
|
|
src="{{private}}/files/smtpd/gateway.complete.crt"
|
2016-09-27 18:21:10 +00:00
|
|
|
dest=/etc/pki/tls/certs/gateway.crt
|
2016-09-27 01:10:46 +00:00
|
|
|
owner=root
|
|
|
|
group=root
|
|
|
|
mode=0644
|
2016-09-27 17:37:21 +00:00
|
|
|
when: inventory_hostname.startswith(('bastion','smtp-mm'))
|
2016-09-27 01:10:46 +00:00
|
|
|
notify:
|
|
|
|
- restart postfix
|
|
|
|
tags:
|
|
|
|
- postfix
|
|
|
|
|
2016-09-27 01:46:38 +00:00
|
|
|
- name: Copy gateway.key
|
|
|
|
copy:
|
|
|
|
src="{{private}}/files/smtpd/gateway.key"
|
|
|
|
dest=/etc/pki/tls/private/
|
2016-09-27 01:10:46 +00:00
|
|
|
owner=root
|
2016-09-27 03:00:03 +00:00
|
|
|
group=postfix
|
|
|
|
mode=0640
|
2016-09-27 17:37:21 +00:00
|
|
|
when: inventory_hostname.startswith(('bastion','smtp-mm'))
|
2016-09-27 01:10:46 +00:00
|
|
|
notify:
|
|
|
|
- restart postfix
|
|
|
|
tags:
|
|
|
|
- postfix
|