mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-12-25 10:28:29 +01:00
Relocate some validation tasks
This commit is contained in:
parent
67dc5237c5
commit
7a90eb6d4f
@ -11,28 +11,10 @@
|
|||||||
- "{{ matrix_cron_path }}/matrix-ssl-certificate-renewal"
|
- "{{ matrix_cron_path }}/matrix-ssl-certificate-renewal"
|
||||||
- "{{ matrix_cron_path }}/matrix-nginx-proxy-periodic-restarter"
|
- "{{ matrix_cron_path }}/matrix-nginx-proxy-periodic-restarter"
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Tasks related to setting up Let's Encrypt's management of certificates
|
# Tasks related to setting up Let's Encrypt's management of certificates
|
||||||
#
|
#
|
||||||
|
|
||||||
- name: (Deprecation) Catch and report renamed settings
|
|
||||||
fail:
|
|
||||||
msg: >-
|
|
||||||
Your configuration contains a variable, which now has a different name.
|
|
||||||
Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
|
|
||||||
with_items:
|
|
||||||
- {'old': 'host_specific_matrix_ssl_support_email', 'new': 'matrix_ssl_lets_encrypt_support_email'}
|
|
||||||
- {'old': 'host_specific_matrix_ssl_lets_encrypt_support_email', 'new': 'matrix_ssl_lets_encrypt_support_email'}
|
|
||||||
when: "matrix_ssl_retrieval_method == 'lets-encrypt' and item.old in vars"
|
|
||||||
|
|
||||||
- name: Fail if required variables are undefined
|
|
||||||
fail:
|
|
||||||
msg: "Detected an undefined required variable"
|
|
||||||
with_items:
|
|
||||||
- "matrix_ssl_lets_encrypt_support_email"
|
|
||||||
when: "matrix_ssl_retrieval_method == 'lets-encrypt' and vars[item] is none"
|
|
||||||
|
|
||||||
- name: Ensure certbot Docker image is pulled
|
- name: Ensure certbot Docker image is pulled
|
||||||
docker_image:
|
docker_image:
|
||||||
name: "{{ matrix_ssl_lets_encrypt_certbot_docker_image }}"
|
name: "{{ matrix_ssl_lets_encrypt_certbot_docker_image }}"
|
||||||
|
@ -24,3 +24,22 @@
|
|||||||
msg: >-
|
msg: >-
|
||||||
`matrix_nginx_proxy_ssl_preset` needs to be set to a known value.
|
`matrix_nginx_proxy_ssl_preset` needs to be set to a known value.
|
||||||
when: "matrix_nginx_proxy_ssl_preset not in ['modern', 'intermediate', 'old']"
|
when: "matrix_nginx_proxy_ssl_preset not in ['modern', 'intermediate', 'old']"
|
||||||
|
|
||||||
|
- block:
|
||||||
|
- name: (Deprecation) Catch and report renamed settings
|
||||||
|
fail:
|
||||||
|
msg: >-
|
||||||
|
Your configuration contains a variable, which now has a different name.
|
||||||
|
Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
|
||||||
|
with_items:
|
||||||
|
- {'old': 'host_specific_matrix_ssl_support_email', 'new': 'matrix_ssl_lets_encrypt_support_email'}
|
||||||
|
- {'old': 'host_specific_matrix_ssl_lets_encrypt_support_email', 'new': 'matrix_ssl_lets_encrypt_support_email'}
|
||||||
|
when: "item.old in vars"
|
||||||
|
|
||||||
|
- name: Fail if required variables are undefined
|
||||||
|
fail:
|
||||||
|
msg: "Detected an undefined required variable"
|
||||||
|
with_items:
|
||||||
|
- "matrix_ssl_lets_encrypt_support_email"
|
||||||
|
when: "vars[item] is none"
|
||||||
|
when: "matrix_ssl_retrieval_method == 'lets-encrypt'"
|
||||||
|
Loading…
Reference in New Issue
Block a user