add tls certs to postfix and dovecot

This commit is contained in:
Robert Kaussow 2018-08-04 23:30:31 +02:00
parent 9a3ab9bae2
commit f7646a6374
2 changed files with 35 additions and 1 deletions

View File

@ -6,3 +6,19 @@
enabled: yes enabled: yes
listen: __ucs_apache_restart listen: __ucs_apache_restart
become: True become: True
- name: Restart dovecot service
service:
name: dovecot
state: restarted
enabled: yes
listen: __ucs_dovecot_restart
become: True
- name: Restart postfix service
service:
name: postfix
state: restarted
enabled: yes
listen: __ucs_postfix_restart
become: True

View File

@ -21,7 +21,7 @@
label: "{{ item.dest }}" label: "{{ item.dest }}"
notify: __ucs_apache_restart notify: __ucs_apache_restart
- name: Set necessary ucr vars - name: Set apache2 ucr vars
ucr: ucr:
path: "{{ item.path }}" path: "{{ item.path }}"
value: "{{ item.value }}" value: "{{ item.value }}"
@ -29,5 +29,23 @@
- { path: apache2/ssl/certificate, value: "{{ ucs_tls_certs_dir }}/ucs.pem" } - { path: apache2/ssl/certificate, value: "{{ ucs_tls_certs_dir }}/ucs.pem" }
- { path: apache2/ssl/key, value: "{{ ucs_tls_key_dir }}/ucs.pem" } - { path: apache2/ssl/key, value: "{{ ucs_tls_key_dir }}/ucs.pem" }
notify: __ucs_apache_restart notify: __ucs_apache_restart
- name: Set dovecot ucr vars
ucr:
path: "{{ item.path }}"
value: "{{ item.value }}"
with_items:
- { 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
- name: Set postfix ucr vars
ucr:
path: "{{ item.path }}"
value: "{{ item.value }}"
with_items:
- { 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
become: True become: True
become_user: root become_user: root