Replace most import_tasks calls with include_tasks for improved performance

This commit is contained in:
Slavi Pantaleev
2022-11-24 11:33:30 +02:00
parent 5c3df22c35
commit 7c2a7a8eb6
115 changed files with 1175 additions and 1654 deletions

View File

@ -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