mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-11-06 02:37:31 +01:00
Fixed linting errors
This commit is contained in:
parent
b3655f439c
commit
56880ad220
@ -9,6 +9,7 @@
|
||||
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_synapse_enabled_worker_names: "{{ matrix_synapse_workers_enabled_list | map(attribute='name') }}"
|
||||
matrix_synapse_worker_template_job_status_result_list: []
|
||||
|
||||
# This also deletes some things which we need. They will be recreated below.
|
||||
- name: Ensure unnecessary worker configs are cleaned
|
||||
@ -45,11 +46,9 @@
|
||||
with_items: "{{ matrix_synapse_workers_enabled_list }}"
|
||||
loop_control:
|
||||
loop_var: matrix_synapse_worker_details
|
||||
index_var: worker_template_creation_index
|
||||
|
||||
- name: Check status of worker systemd service files and configuration files creation
|
||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/synapse/workers/util/worker_setup_job_cleanup.yml"
|
||||
with_items: "{{ matrix_synapse_workers_enabled_list }}"
|
||||
with_items: "{{ matrix_synapse_worker_template_job_status_result_list }}"
|
||||
loop_control:
|
||||
loop_var: matrix_synapse_worker_details
|
||||
index_var: worker_template_job_status_index
|
||||
loop_var: matrix_synapse_worker_template_job_status
|
||||
|
@ -29,6 +29,7 @@
|
||||
become: false
|
||||
async: 60
|
||||
poll: 0
|
||||
changed_when: false
|
||||
|
||||
- name: Ensure systemd service exists for {{ matrix_synapse_worker_systemd_service_name }}
|
||||
ansible.builtin.command: >
|
||||
@ -64,11 +65,13 @@
|
||||
become: false
|
||||
async: 60
|
||||
poll: 0
|
||||
changed_when: false
|
||||
|
||||
# Create unique variable identifiers for checking job status later
|
||||
# Store job status results for checking later
|
||||
- ansible.builtin.set_fact:
|
||||
"{{ item.name }}": "{{ item.val }}"
|
||||
when: item.name not in vars
|
||||
matrix_synapse_worker_template_job_status_result_list: "{{ matrix_synapse_worker_template_job_status_result_list + [item] }}"
|
||||
with_items:
|
||||
- { name: "configuration_result_{{ worker_template_creation_index }}", val: "{{ configuration_result }}" }
|
||||
- { name: "service_result_{{ worker_template_creation_index }}", val: "{{ service_result }}" }
|
||||
- result:
|
||||
name: "{{ matrix_synapse_worker_details.name }}"
|
||||
configuration: "{{ configuration_result }}"
|
||||
service: "{{ service_result }}"
|
||||
|
@ -1,11 +1,9 @@
|
||||
---
|
||||
|
||||
# Clean up Ansible controller temp files as a result of spawning async tasks
|
||||
- name: Check job status for configuration file {{ matrix_synapse_worker_details.name }}
|
||||
vars:
|
||||
worker_configuration_result: "{{ lookup('ansible.builtin.vars', 'configuration_result_' + worker_template_job_status_index|string) }}"
|
||||
- name: Check job status for configuration file {{ matrix_synapse_worker_template_job_status.result.name }}
|
||||
ansible.builtin.async_status:
|
||||
jid: "{{ worker_configuration_result.ansible_job_id }}"
|
||||
jid: "{{ matrix_synapse_worker_template_job_status.result.configuration.ansible_job_id }}"
|
||||
register: configuration_status
|
||||
until: configuration_status.finished
|
||||
retries: 60
|
||||
@ -13,11 +11,9 @@
|
||||
delegate_to: localhost
|
||||
become: false
|
||||
|
||||
- name: Check job status for service file {{ matrix_synapse_worker_details.name }}
|
||||
vars:
|
||||
worker_service_result: "{{ lookup('ansible.builtin.vars', 'service_result_' + worker_template_job_status_index|string) }}"
|
||||
- name: Check job status for service file {{ matrix_synapse_worker_template_job_status.result.name }}
|
||||
ansible.builtin.async_status:
|
||||
jid: "{{ worker_service_result.ansible_job_id }}"
|
||||
jid: "{{ matrix_synapse_worker_template_job_status.result.service.ansible_job_id }}"
|
||||
register: service_status
|
||||
until: service_status.finished
|
||||
retries: 60
|
||||
@ -26,19 +22,15 @@
|
||||
become: false
|
||||
|
||||
- name: Cleanup job result for configuration file
|
||||
vars:
|
||||
worker_configuration_result: "{{ lookup('ansible.builtin.vars', 'configuration_result_' + worker_template_job_status_index|string) }}"
|
||||
ansible.builtin.async_status:
|
||||
jid: "{{ worker_configuration_result.ansible_job_id }}"
|
||||
jid: "{{ matrix_synapse_worker_template_job_status.result.configuration.ansible_job_id }}"
|
||||
mode: "cleanup"
|
||||
delegate_to: localhost
|
||||
become: false
|
||||
|
||||
- name: Cleanup job result for service file
|
||||
vars:
|
||||
worker_service_result: "{{ lookup('ansible.builtin.vars', 'service_result_' + worker_template_job_status_index|string) }}"
|
||||
ansible.builtin.async_status:
|
||||
jid: "{{ worker_service_result.ansible_job_id }}"
|
||||
jid: "{{ matrix_synapse_worker_template_job_status.result.service.ansible_job_id }}"
|
||||
mode: "cleanup"
|
||||
delegate_to: localhost
|
||||
become: false
|
||||
|
Loading…
Reference in New Issue
Block a user