Fix async commands

Fixes a regression introduced in d1b5681ba0.

Looks like `.finished` is a property on the main object, not on some
`.async_result` object.
This commit is contained in:
Slavi Pantaleev 2022-10-06 19:48:11 +03:00
parent aff7ca2426
commit a12cbeac3b
4 changed files with 9 additions and 9 deletions

View File

@ -108,5 +108,5 @@
async: "{{ postgres_import_wait_time }}" async: "{{ postgres_import_wait_time }}"
poll: 10 poll: 10
register: matrix_postgres_import_postgres_command_result register: matrix_postgres_import_postgres_command_result
failed_when: not matrix_postgres_import_postgres_command_result.async_result.finished failed_when: not matrix_postgres_import_postgres_command_result.finished
changed_when: matrix_postgres_import_postgres_command_result.async_result.finished and matrix_postgres_import_postgres_command_result.rc == 0 changed_when: matrix_postgres_import_postgres_command_result.finished and matrix_postgres_import_postgres_command_result.rc == 0

View File

@ -78,8 +78,8 @@
async: "{{ postgres_vacuum_wait_time }}" async: "{{ postgres_vacuum_wait_time }}"
poll: 10 poll: 10
register: matrix_postgres_synapse_vacuum_result register: matrix_postgres_synapse_vacuum_result
failed_when: not matrix_postgres_synapse_vacuum_result.async_result.finished failed_when: not matrix_postgres_synapse_vacuum_result.finished
changed_when: matrix_postgres_synapse_vacuum_result.async_result.finished and matrix_postgres_synapse_vacuum_result.rc == 0 changed_when: matrix_postgres_synapse_vacuum_result.finished and matrix_postgres_synapse_vacuum_result.rc == 0
# Intentionally show the results # Intentionally show the results
- ansible.builtin.debug: var="matrix_postgres_synapse_vacuum_result" - ansible.builtin.debug: var="matrix_postgres_synapse_vacuum_result"

View File

@ -21,8 +21,8 @@
async: "{{ matrix_synapse_rust_synapse_compress_state_compress_room_time }}" async: "{{ matrix_synapse_rust_synapse_compress_state_compress_room_time }}"
poll: 10 poll: 10
register: matrix_synapse_rust_synapse_compress_state_compress_room_command_result register: matrix_synapse_rust_synapse_compress_state_compress_room_command_result
failed_when: not matrix_synapse_rust_synapse_compress_state_compress_room_command_result.async_result.finished failed_when: not matrix_synapse_rust_synapse_compress_state_compress_room_command_result.finished
changed_when: matrix_synapse_rust_synapse_compress_state_compress_room_command_result.async_result.finished and matrix_synapse_rust_synapse_compress_state_compress_room_command_result.rc == 0 changed_when: matrix_synapse_rust_synapse_compress_state_compress_room_command_result.finished and matrix_synapse_rust_synapse_compress_state_compress_room_command_result.rc == 0
- ansible.builtin.debug: var="matrix_synapse_rust_synapse_compress_state_compress_room_command_result" - ansible.builtin.debug: var="matrix_synapse_rust_synapse_compress_state_compress_room_command_result"
@ -45,8 +45,8 @@
async: "{{ matrix_synapse_rust_synapse_compress_state_psql_import_time }}" async: "{{ matrix_synapse_rust_synapse_compress_state_psql_import_time }}"
poll: 10 poll: 10
register: matrix_synapse_rust_synapse_compress_state_psql_import_command_result register: matrix_synapse_rust_synapse_compress_state_psql_import_command_result
failed_when: not matrix_synapse_rust_synapse_compress_state_psql_import_command_result.async_result.finished failed_when: not matrix_synapse_rust_synapse_compress_state_psql_import_command_result.finished
changed_when: matrix_synapse_rust_synapse_compress_state_psql_import_command_result.async_result.finished and matrix_synapse_rust_synapse_compress_state_psql_import_command_result.rc == 0 changed_when: matrix_synapse_rust_synapse_compress_state_psql_import_command_result.finished and matrix_synapse_rust_synapse_compress_state_psql_import_command_result.rc == 0
- name: Clean up - name: Clean up
ansible.builtin.file: ansible.builtin.file:

View File

@ -70,7 +70,7 @@
async: "{{ matrix_synapse_rust_synapse_compress_state_find_rooms_command_wait_time }}" async: "{{ matrix_synapse_rust_synapse_compress_state_find_rooms_command_wait_time }}"
poll: 10 poll: 10
register: matrix_synapse_rust_synapse_compress_state_find_rooms_command_result register: matrix_synapse_rust_synapse_compress_state_find_rooms_command_result
failed_when: not matrix_synapse_rust_synapse_compress_state_find_rooms_command_result.async_result.finished failed_when: not matrix_synapse_rust_synapse_compress_state_find_rooms_command_result.finished
changed_when: false changed_when: false
# We expect the output to be like this: # We expect the output to be like this: