2018-12-23 11:00:12 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Fail if using unsupported SSL certificate retrieval method
|
|
|
|
fail:
|
|
|
|
msg: "The `matrix_ssl_retrieval_method` variable contains an unsupported value"
|
2019-02-01 16:50:02 +02:00
|
|
|
when: "matrix_ssl_retrieval_method not in ['lets-encrypt', 'self-signed', 'manually-managed', 'none']"
|
2018-12-23 11:00:12 +02:00
|
|
|
|
|
|
|
|
2019-02-01 16:50:02 +02:00
|
|
|
# Common tasks, required by almost any method below.
|
2018-12-23 11:00:12 +02:00
|
|
|
|
|
|
|
- name: Ensure SSL certificate paths exists
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
mode: 0770
|
|
|
|
owner: "{{ matrix_user_username }}"
|
|
|
|
group: "{{ matrix_user_username }}"
|
2019-01-27 20:25:13 +02:00
|
|
|
recurse: true
|
2018-12-23 11:00:12 +02:00
|
|
|
with_items:
|
|
|
|
- "{{ matrix_ssl_log_dir_path }}"
|
|
|
|
- "{{ matrix_ssl_config_dir_path }}"
|
2019-02-01 16:50:02 +02:00
|
|
|
when: "matrix_ssl_retrieval_method != 'none'"
|
2018-12-23 11:00:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
# Method specific tasks follow
|
|
|
|
|
2019-01-12 17:53:00 +02:00
|
|
|
- import_tasks: tasks/ssl/setup_ssl_lets_encrypt.yml
|
2018-12-23 11:00:12 +02:00
|
|
|
|
2019-01-12 17:53:00 +02:00
|
|
|
- import_tasks: tasks/ssl/setup_ssl_self_signed.yml
|
2018-12-23 11:00:12 +02:00
|
|
|
|
2019-01-12 17:53:00 +02:00
|
|
|
- import_tasks: tasks/ssl/setup_ssl_manually_managed.yml
|