From f08492e24fc98154bb1ed3f231b76620c993690d Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sat, 4 Aug 2018 23:46:05 +0200 Subject: [PATCH] fix handlers --- handlers/main.yml | 3 +++ tasks/tls.yml | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/handlers/main.yml b/handlers/main.yml index 39c22fb..8c125ea 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -5,6 +5,7 @@ state: restarted enabled: yes listen: __ucs_apache_restart + when: ucs_custom_tls_apache2_enabled become: True - name: Restart dovecot service @@ -13,6 +14,7 @@ state: restarted enabled: yes listen: __ucs_dovecot_restart + when: ucs_custom_tls_dovecot_enabled become: True - name: Restart postfix service @@ -21,4 +23,5 @@ state: restarted enabled: yes listen: __ucs_postfix_restart + when: ucs_custom_tls_postfix_enabled become: True diff --git a/tasks/tls.yml b/tasks/tls.yml index e66f257..d0d3b05 100644 --- a/tasks/tls.yml +++ b/tasks/tls.yml @@ -19,7 +19,10 @@ - { src: "{{ ucs_tls_key_path }}", dest: "{{ ucs_tls_key_dir }}/ucs.pem", mode: '0750' } loop_control: label: "{{ item.dest }}" - notify: __ucs_apache_restart + notify: + - __ucs_apache_restart + - __ucs_dov_restart + - __ucs_postfix_restart - name: Set apache2 ucr vars ucr: