Report async task failures better
We were previously trying to reach into `.rc`, but there's no such thing if `async_result.finished == 0`. Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2153
This commit is contained in:
@ -108,4 +108,5 @@
|
||||
async: "{{ postgres_import_wait_time }}"
|
||||
poll: 10
|
||||
register: matrix_postgres_import_postgres_command_result
|
||||
changed_when: matrix_postgres_import_postgres_command_result.rc == 0
|
||||
failed_when: not matrix_postgres_import_postgres_command_result.async_result.finished
|
||||
changed_when: matrix_postgres_import_postgres_command_result.async_result.finished and matrix_postgres_import_postgres_command_result.rc == 0
|
||||
|
@ -78,7 +78,8 @@
|
||||
async: "{{ postgres_vacuum_wait_time }}"
|
||||
poll: 10
|
||||
register: matrix_postgres_synapse_vacuum_result
|
||||
changed_when: matrix_postgres_synapse_vacuum_result.rc == 0
|
||||
failed_when: not matrix_postgres_synapse_vacuum_result.async_result.finished
|
||||
changed_when: matrix_postgres_synapse_vacuum_result.async_result.finished and matrix_postgres_synapse_vacuum_result.rc == 0
|
||||
|
||||
# Intentionally show the results
|
||||
- ansible.builtin.debug: var="matrix_postgres_synapse_vacuum_result"
|
||||
|
Reference in New Issue
Block a user