diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2016-05-11 18:07:09 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2016-05-12 11:33:55 +0200 |
commit | 90d498034b891123350785a134402172de477f4f (patch) | |
tree | a6e3c924054c3f689cdaffffe3a479e88fb97282 /roles/IMAP-proxy/tasks | |
parent | e370313ad5895871479fffc922e3c72c0375dbf2 (diff) |
Use systemd unit files for stunnel4.
Diffstat (limited to 'roles/IMAP-proxy/tasks')
-rw-r--r-- | roles/IMAP-proxy/tasks/main.yml | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/roles/IMAP-proxy/tasks/main.yml b/roles/IMAP-proxy/tasks/main.yml index 587fc62..3d4efb1 100644 --- a/roles/IMAP-proxy/tasks/main.yml +++ b/roles/IMAP-proxy/tasks/main.yml @@ -43,16 +43,6 @@ - meta: flush_handlers -- name: Install stunnel - apt: pkg=stunnel4 - -- name: Auto-enable stunnel - lineinfile: dest=/etc/default/stunnel4 - regexp='^(\s*#)?\s*ENABLED=' - line='ENABLED=1' - owner=root group=root - mode=0644 - - name: Create /etc/stunnel/certs file: path=/etc/stunnel/certs state=directory @@ -70,7 +60,7 @@ mode=0644 register: r1 notify: - - Restart stunnel + - Restart stunnel@roundcube - name: Copy slapd's X.509 certificate copy: src=certs/ldap/ldap.fripost.org.pem @@ -79,7 +69,7 @@ mode=0644 register: r2 notify: - - Restart stunnel + - Restart stunnel@roundcube - name: Configure stunnel copy: src=etc/stunnel/roundcube.conf @@ -88,10 +78,13 @@ mode=0644 register: r3 notify: - - Restart stunnel + - Restart stunnel@roundcube + +- name: Enable stunnel@roundcube + service: name=stunnel4@roundcube enabled=yes -- name: Start stunnel - service: name=stunnel4 pattern=/usr/bin/stunnel4 state=started +- name: Start stunnel@roundcube + service: name=stunnel4@roundcube state=started when: not (r1.changed or r2.changed or r3.changed) - meta: flush_handlers |