diff --git a/defaults/main.yml b/defaults/main.yml index 2aea616..70f4e55 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,8 @@ --- ucs_custom_tls_enabled: False +ucs_custom_tls_apache2_enabled: False +ucs_custom_tls_dovecot_enabled: False +ucs_custom_tls_postfix_enabled: False ucs_tls_certs_dir: /etc/pki/tls/certs ucs_tls_key_dir: /etc/pki/tls/private ucs_tls_cert_path: /etc/pki/tls/certs/mycert.pem diff --git a/tasks/tls.yml b/tasks/tls.yml index ad4e451..444ca3c 100644 --- a/tasks/tls.yml +++ b/tasks/tls.yml @@ -29,6 +29,7 @@ - { path: apache2/ssl/certificate, value: "{{ ucs_tls_certs_dir }}/ucs.pem" } - { path: apache2/ssl/key, value: "{{ ucs_tls_key_dir }}/ucs.pem" } notify: __ucs_apache_restart + when: ucs_custom_tls_apache2_enabled - name: Set dovecot ucr vars ucr: @@ -38,6 +39,7 @@ - { path: mail/dovecot/ssl/certificate, value: "{{ ucs_tls_certs_dir }}/ucs.pem" } - { path: mail/dovecot/ssl/key, value: "{{ ucs_tls_key_dir }}/ucs.pem" } notify: __ucs_dovecot_restart + when: ucs_custom_tls_dovecot_enabled - name: Set postfix ucr vars ucr: @@ -47,6 +49,7 @@ - { path: mail/postfix/ssl/certificate, value: "{{ ucs_tls_certs_dir }}/ucs.pem" } - { path: mail/postfix/ssl/key, value: "{{ ucs_tls_key_dir }}/ucs.pem" } notify: __ucs_postfix_restart + when: ucs_custom_tls_postfix_enabled become: True become_user: root when: ucs_custom_tls_enabled