More ansible-lint fixes
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
- import_tasks: "{{ role_path }}/tasks/dendrite/setup_install.yml"
|
||||
when: matrix_dendrite_enabled|bool
|
||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/dendrite/setup_install.yml"
|
||||
when: matrix_dendrite_enabled | bool
|
||||
|
||||
- import_tasks: "{{ role_path }}/tasks/dendrite/setup_uninstall.yml"
|
||||
when: "not matrix_dendrite_enabled|bool"
|
||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/dendrite/setup_uninstall.yml"
|
||||
when: "not matrix_dendrite_enabled | bool"
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
# This will throw a Permission Denied error if already mounted using fuse
|
||||
- name: Check Dendrite media store path
|
||||
stat:
|
||||
ansible.builtin.stat:
|
||||
path: "{{ matrix_dendrite_media_store_path }}"
|
||||
register: local_path_media_store_stat
|
||||
ignore_errors: true
|
||||
@ -29,7 +29,7 @@
|
||||
until: result is not failed
|
||||
|
||||
- name: Check if a Dendrite signing key exists
|
||||
stat:
|
||||
ansible.builtin.stat:
|
||||
path: "{{ matrix_dendrite_config_dir_path }}/{{ matrix_server_fqn_matrix }}.signing.pem"
|
||||
register: matrix_dendrite_signing_key_stat
|
||||
|
||||
@ -56,7 +56,7 @@
|
||||
|
||||
- name: Ensure Dendrite configuration installed
|
||||
ansible.builtin.copy:
|
||||
content: "{{ matrix_dendrite_configuration|to_nice_yaml(indent=2, width=999999) }}"
|
||||
content: "{{ matrix_dendrite_configuration | to_nice_yaml(indent=2, width=999999) }}"
|
||||
dest: "{{ matrix_dendrite_config_dir_path }}/dendrite.yaml"
|
||||
mode: 0644
|
||||
owner: "{{ matrix_user_username }}"
|
||||
@ -72,7 +72,7 @@
|
||||
- name: Ensure systemd reloaded after matrix-dendrite.service installation
|
||||
ansible.builtin.service:
|
||||
daemon_reload: true
|
||||
when: "matrix_dendrite_systemd_service_result.changed|bool"
|
||||
when: "matrix_dendrite_systemd_service_result.changed | bool"
|
||||
|
||||
- name: Ensure matrix-dendrite-create-account script created
|
||||
ansible.builtin.template:
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Check existence of matrix-dendrite service
|
||||
stat:
|
||||
ansible.builtin.stat:
|
||||
path: "{{ matrix_systemd_path }}/matrix-dendrite.service"
|
||||
register: matrix_dendrite_service_stat
|
||||
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-dendrite.service'] }}"
|
||||
when: matrix_dendrite_enabled|bool
|
||||
when: matrix_dendrite_enabled | bool
|
||||
|
@ -1,37 +1,37 @@
|
||||
---
|
||||
|
||||
- import_tasks: "{{ role_path }}/tasks/init.yml"
|
||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/init.yml"
|
||||
tags:
|
||||
- always
|
||||
|
||||
- import_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||
when: run_setup|bool
|
||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||
when: run_setup | bool
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-dendrite
|
||||
|
||||
- import_tasks: "{{ role_path }}/tasks/setup_dendrite.yml"
|
||||
when: run_setup|bool
|
||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_dendrite.yml"
|
||||
when: run_setup | bool
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-dendrite
|
||||
|
||||
- import_tasks: "{{ role_path }}/tasks/register_user.yml"
|
||||
when: run_dendrite_register_user|bool and matrix_dendrite_enabled|bool
|
||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/register_user.yml"
|
||||
when: run_dendrite_register_user | bool and matrix_dendrite_enabled | bool
|
||||
tags:
|
||||
- register-user
|
||||
|
||||
- import_tasks: "{{ role_path }}/tasks/self_check_client_api.yml"
|
||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/self_check_client_api.yml"
|
||||
delegate_to: 127.0.0.1
|
||||
become: false
|
||||
when: run_self_check|bool and matrix_dendrite_enabled|bool
|
||||
when: run_self_check | bool and matrix_dendrite_enabled | bool
|
||||
tags:
|
||||
- self-check
|
||||
|
||||
- import_tasks: "{{ role_path }}/tasks/self_check_federation_api.yml"
|
||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/self_check_federation_api.yml"
|
||||
delegate_to: 127.0.0.1
|
||||
become: false
|
||||
when: run_self_check|bool and matrix_dendrite_enabled|bool
|
||||
when: run_self_check | bool and matrix_dendrite_enabled | bool
|
||||
tags:
|
||||
- self-check
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
register: start_result
|
||||
|
||||
- name: Wait a while, so that Dendrite can manage to start
|
||||
pause:
|
||||
ansible.builtin.pause:
|
||||
seconds: 7
|
||||
when: "start_result.changed"
|
||||
|
||||
|
@ -11,14 +11,14 @@
|
||||
- name: Fail if Matrix Federation API not working
|
||||
ansible.builtin.fail:
|
||||
msg: "Failed checking Matrix Federation API is up at `{{ matrix_server_fqn_matrix }}` (checked endpoint: `{{ matrix_dendrite_federation_api_url_endpoint_public }}`). Is Dendrite running? Is port {{ matrix_federation_public_port }} open in your firewall? Full error: {{ result_matrix_dendrite_federation_api }}"
|
||||
when: "matrix_dendrite_federation_enabled|bool and (result_matrix_dendrite_federation_api.failed or 'json' not in result_matrix_dendrite_federation_api)"
|
||||
when: "matrix_dendrite_federation_enabled | bool and (result_matrix_dendrite_federation_api.failed or 'json' not in result_matrix_dendrite_federation_api)"
|
||||
|
||||
- name: Fail if Matrix Federation API unexpectedly enabled
|
||||
ansible.builtin.fail:
|
||||
msg: "Matrix Federation API is up at `{{ matrix_server_fqn_matrix }}` (checked endpoint: `{{ matrix_dendrite_federation_api_url_endpoint_public }}`) despite being disabled."
|
||||
when: "not matrix_dendrite_federation_enabled|bool and not result_matrix_dendrite_federation_api.failed"
|
||||
when: "not matrix_dendrite_federation_enabled | bool and not result_matrix_dendrite_federation_api.failed"
|
||||
|
||||
- name: Report working Matrix Federation API
|
||||
ansible.builtin.debug:
|
||||
msg: "The Matrix Federation API at `{{ matrix_server_fqn_matrix }}` (checked endpoint: `{{ matrix_dendrite_federation_api_url_endpoint_public }}`) is working"
|
||||
when: "matrix_dendrite_federation_enabled|bool"
|
||||
when: "matrix_dendrite_federation_enabled | bool"
|
||||
|
@ -10,6 +10,6 @@
|
||||
- {path: "{{ matrix_dendrite_config_dir_path }}", when: true}
|
||||
- {path: "{{ matrix_dendrite_ext_path }}", when: true}
|
||||
- {path: "{{ matrix_dendrite_nats_storage_path }}", when: true}
|
||||
when: "matrix_dendrite_enabled|bool and item.when"
|
||||
when: "matrix_dendrite_enabled | bool and item.when"
|
||||
|
||||
- import_tasks: "{{ role_path }}/tasks/dendrite/setup.yml"
|
||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/dendrite/setup.yml"
|
||||
|
Reference in New Issue
Block a user