diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2014-07-04 00:37:40 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2015-06-07 02:52:24 +0200 |
commit | 58e65628313da8990f1e5cb26bfe4e10e128034e (patch) | |
tree | 1ca5321944c66304b6afad7acf9dbc37d8f0b4f5 /roles/common/tasks/mail.yml | |
parent | 535741b9caaa7b1480d3a6e8290769b1e2e0a55e (diff) |
Reload Postfix upon configuration change, but don't restart it.
(Unless a new instance is created, or the master.cf change is modified.)
Changing some variables, such as inet_protocols, require a full restart,
but most of the time it's overkill.
Diffstat (limited to 'roles/common/tasks/mail.yml')
-rw-r--r-- | roles/common/tasks/mail.yml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/roles/common/tasks/mail.yml b/roles/common/tasks/mail.yml index 3b2a41f..cbec8cf 100644 --- a/roles/common/tasks/mail.yml +++ b/roles/common/tasks/mail.yml @@ -15,51 +15,51 @@ - Restart Postfix - name: Link the dynamic maps & master.cf of each children to the master's # main.cf is specialized to each dedicated role, though file: src=../postfix/{{ item.1 }} dest=/etc/postfix-{{ postfix_instance[item.0].name }}/{{ item.1 }} owner=root group=root state=link force=yes register: r2 with_nested: - postfix_instance.keys() | intersect(group_names) | list - [ 'dynamicmaps.cf', 'master.cf' ] notify: - Restart Postfix - name: Configure Postfix (1) copy: src=etc/postfix/master.cf dest=/etc/postfix/master.cf owner=root group=root mode=0644 + register: r3 notify: - - Reload Postfix + - Restart Postfix - name: Configure Postfix (2) template: src=etc/postfix/main.cf.j2 dest=/etc/postfix/main.cf owner=root group=root mode=0644 - register: r3 notify: - - Restart Postfix + - Reload Postfix - name: Create directory /etc/postfix/ssl file: path=/etc/postfix/ssl state=directory owner=root group=root mode=0755 tags: - genkey - name: Generate a private key and a X.509 certificate for Postfix command: genkeypair.sh x509 --pubkey=/etc/postfix/ssl/{{ ansible_fqdn }}.pem --privkey=/etc/postfix/ssl/{{ ansible_fqdn }}.key --dns={{ ansible_fqdn }} -t ecdsa -b secp384r1 -h sha512 register: r4 changed_when: r4.rc == 0 failed_when: r4.rc > 1 tags: - genkey |