2019-01-19 01:19:57 +00:00
|
|
|
---
|
|
|
|
- block:
|
|
|
|
- name: Create tls folder structure
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ matrix_user }}"
|
|
|
|
group: "{{ matrix_group }}"
|
|
|
|
recurse: True
|
2019-01-30 21:35:57 +00:00
|
|
|
loop:
|
2019-01-19 02:27:47 +00:00
|
|
|
- "{{ matrix_tls_dhparam_path | dirname }}"
|
2019-01-19 01:19:57 +00:00
|
|
|
- "{{ matrix_tls_cert_path | dirname }}"
|
|
|
|
- "{{ matrix_tls_key_path | dirname }}"
|
|
|
|
become: True
|
|
|
|
become_user: root
|
|
|
|
|
|
|
|
- block:
|
|
|
|
- name: Copy certs and private key
|
|
|
|
copy:
|
|
|
|
src: "{{ item.src }}"
|
|
|
|
dest: "{{ item.dest }}"
|
|
|
|
mode: "{{ item.mode }}"
|
2019-01-30 21:35:57 +00:00
|
|
|
loop:
|
2019-01-19 01:19:57 +00:00
|
|
|
- { src: "{{ matrix_tls_key_source }}", dest: '{{ matrix_tls_key_path }}', mode: '0600' }
|
2019-01-20 14:13:39 +00:00
|
|
|
- { src: "{{ matrix_tls_cert_source }}", dest: '{{ matrix_tls_cert_path }}', mode: '0650' }
|
2019-01-19 01:19:57 +00:00
|
|
|
loop_control:
|
|
|
|
label: "{{ item.dest }}"
|
2019-02-05 22:42:17 +00:00
|
|
|
notify: __matrix_restart
|
2019-01-19 02:27:47 +00:00
|
|
|
|
|
|
|
- name: Create Diffie-Hellman Parameter
|
|
|
|
openssl_dhparam:
|
|
|
|
path: "{{ matrix_tls_dhparam_path }}"
|
|
|
|
size: "{{ matrix_tls_dhparam_size }}"
|
|
|
|
when: matrix_tls_dhparam_path is defined
|
2019-02-05 22:42:17 +00:00
|
|
|
notify: __matrix_restart
|
2019-01-19 01:19:57 +00:00
|
|
|
become: True
|
|
|
|
become_user: "{{ matrix_user }}"
|