Replace most import_tasks calls with include_tasks for improved performance
This commit is contained in:
@ -1,32 +1,26 @@
|
||||
---
|
||||
|
||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||
when: run_setup | bool
|
||||
- block:
|
||||
- when: matrix_dendrite_enabled | bool
|
||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||
|
||||
- when: matrix_dendrite_enabled | bool
|
||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_dendrite.yml"
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-dendrite
|
||||
|
||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/setup_dendrite.yml"
|
||||
when: run_setup | bool
|
||||
tags:
|
||||
- setup-all
|
||||
- setup-dendrite
|
||||
- block:
|
||||
- when: matrix_dendrite_enabled | bool
|
||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/self_check_client_api.yml"
|
||||
|
||||
- ansible.builtin.import_tasks: "{{ role_path }}/tasks/register_user.yml"
|
||||
when: run_dendrite_register_user | bool and matrix_dendrite_enabled | bool
|
||||
- when: matrix_dendrite_enabled | bool
|
||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/self_check_federation_api.yml"
|
||||
tags:
|
||||
- self-check
|
||||
|
||||
- block:
|
||||
- when: matrix_dendrite_enabled | bool
|
||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/register_user.yml"
|
||||
tags:
|
||||
- register-user
|
||||
|
||||
- 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
|
||||
tags:
|
||||
- self-check
|
||||
|
||||
- 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
|
||||
tags:
|
||||
- self-check
|
||||
|
@ -1,4 +1,5 @@
|
||||
---
|
||||
|
||||
- name: Fail if playbook called incorrectly
|
||||
ansible.builtin.fail:
|
||||
msg: "The `username` variable needs to be provided to this playbook, via --extra-vars"
|
||||
|
@ -7,6 +7,8 @@
|
||||
register: result_matrix_dendrite_client_api
|
||||
ignore_errors: true
|
||||
check_mode: false
|
||||
delegate_to: 127.0.0.1
|
||||
become: false
|
||||
|
||||
- name: Fail if Matrix Client API not working
|
||||
ansible.builtin.fail:
|
||||
|
@ -7,6 +7,8 @@
|
||||
register: result_matrix_dendrite_federation_api
|
||||
ignore_errors: true
|
||||
check_mode: false
|
||||
delegate_to: 127.0.0.1
|
||||
become: false
|
||||
|
||||
- name: Fail if Matrix Federation API not working
|
||||
ansible.builtin.fail:
|
||||
|
Reference in New Issue
Block a user