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
|
|
|
|
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
|
|
|
|
|
|
|
|
|
2016-09-27 01:10:46 +00:00
|
|
|
- name: install /etc/pki/tls/certs/{{name}}.csr
|
|
|
|
copy: >
|
|
|
|
src={{item}}
|
|
|
|
dest=/etc/pki/tls/certs/{{item | basename}}
|
|
|
|
owner=root
|
|
|
|
group=root
|
|
|
|
mode=0644
|
|
|
|
with_first_found:
|
|
|
|
- "{{private}}/files/httpd/{{cert}}.cert"
|
|
|
|
- "{{private}}/files/httpd/{{name}}.cert"
|
|
|
|
notify:
|
|
|
|
- restart postfix
|
|
|
|
tags:
|
|
|
|
- postfix
|
|
|
|
|
|
|
|
- name: Copy {{name}}.key
|
|
|
|
copy: >
|
|
|
|
src={{item}}
|
|
|
|
dest=/etc/pki/tls/private/{{item | basename}}
|
|
|
|
owner=root
|
|
|
|
group=root
|
|
|
|
mode=0600
|
|
|
|
with_first_found:
|
|
|
|
- "{{private}}/files/httpd/{{key}}.key"
|
|
|
|
- "{{private}}/files/httpd/{{name}}.key"
|
|
|
|
notify:
|
|
|
|
- restart postfix
|
|
|
|
tags:
|
|
|
|
- postfix
|