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: