fix: all praise the allmighty yamllinter

This commit is contained in:
Marko Weltzer
2022-02-05 21:32:54 +01:00
parent d3983a0f04
commit 7e5b88c3b7
373 changed files with 1565 additions and 1296 deletions

View File

@ -1,3 +1,4 @@
---
- set_fact:
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-nginx-proxy.service'] }}"
when: matrix_nginx_proxy_enabled|bool

View File

@ -1,3 +1,4 @@
---
- import_tasks: "{{ role_path }}/tasks/init.yml"
tags:
- always
@ -35,4 +36,4 @@
set_fact:
matrix_nginx_proxy_role_executed: true
tags:
- always
- always

View File

@ -14,7 +14,7 @@
validate_certs: "{{ well_known_file_check.validate_certs }}"
headers:
Origin: example.com
check_mode: no
check_mode: false
register: result_well_known_matrix
ignore_errors: true
@ -44,7 +44,7 @@
validate_certs: "{{ well_known_file_check.validate_certs }}"
headers:
Origin: example.com
check_mode: no
check_mode: false
register: result_well_known_identity
ignore_errors: true

View File

@ -195,7 +195,7 @@
- name: Ensure systemd reloaded after matrix-nginx-proxy.service installation
service:
daemon_reload: yes
daemon_reload: true
when: "matrix_nginx_proxy_enabled and matrix_nginx_proxy_systemd_service_result.changed"
@ -213,8 +213,8 @@
service:
name: matrix-nginx-proxy
state: stopped
enabled: no
daemon_reload: yes
enabled: false
daemon_reload: true
register: stopping_result
when: "not matrix_nginx_proxy_enabled|bool and matrix_nginx_proxy_service_stat.stat.exists"
@ -226,7 +226,7 @@
- name: Ensure systemd reloaded after matrix-nginx-proxy.service removal
service:
daemon_reload: yes
daemon_reload: true
when: "not matrix_nginx_proxy_enabled|bool and matrix_nginx_proxy_service_stat.stat.exists"
- name: Ensure Matrix nginx-proxy configuration for matrix domain deleted

View File

@ -1,3 +1,4 @@
---
- set_fact:
matrix_well_known_file_path: "{{ matrix_static_files_base_path }}/.well-known/matrix/client"
@ -21,4 +22,4 @@
dest: "{{ matrix_static_files_base_path }}/.well-known/matrix"
mode: 0644
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
group: "{{ matrix_user_groupname }}"

View File

@ -1,3 +1,4 @@
---
- debug:
msg: "Dealing with SSL certificate retrieval for domain: {{ domain_name }}"
@ -13,16 +14,16 @@
domain_name_needs_cert: "{{ not domain_name_certificate_path_stat.stat.exists }}"
- block:
- name: Ensure required service for obtaining is started
service:
name: "{{ matrix_ssl_pre_obtaining_required_service_name }}"
state: started
register: matrix_ssl_pre_obtaining_required_service_start_result
- name: Ensure required service for obtaining is started
service:
name: "{{ matrix_ssl_pre_obtaining_required_service_name }}"
state: started
register: matrix_ssl_pre_obtaining_required_service_start_result
- name: Wait some time, so that the required service for obtaining can start
wait_for:
timeout: "{{ matrix_ssl_pre_obtaining_required_service_start_wait_time_seconds }}"
when: "matrix_ssl_pre_obtaining_required_service_start_result.changed|bool"
- name: Wait some time, so that the required service for obtaining can start
wait_for:
timeout: "{{ matrix_ssl_pre_obtaining_required_service_start_wait_time_seconds }}"
when: "matrix_ssl_pre_obtaining_required_service_start_result.changed|bool"
when: "domain_name_needs_cert|bool and matrix_ssl_pre_obtaining_required_service_name != ''"
# This will fail if there is something running on port 80 (like matrix-nginx-proxy).

View File

@ -5,4 +5,4 @@
with_items: "{{ matrix_ssl_domains_to_obtain_certificates_for }}"
loop_control:
loop_var: domain_name
when: "matrix_ssl_retrieval_method == 'manually-managed'"
when: "matrix_ssl_retrieval_method == 'manually-managed'"

View File

@ -20,4 +20,4 @@
- fail:
msg: "Failed finding a certificate key file (for domain `{{ domain_name }}`) at `{{ matrix_ssl_certificate_verification_cert_key_path }}`"
when: "not matrix_ssl_certificate_verification_cert_key_path_stat_result.stat.exists"
when: "not matrix_ssl_certificate_verification_cert_key_path_stat_result.stat.exists"