|
83 | 83 | error_flag: true |
84 | 84 | when: ansible_check_mode and __job_templates_job_async.failed is defined and __job_templates_job_async.failed |
85 | 85 |
|
86 | | -- name: "Managing Controller Job Templates | include async file" |
87 | | - ansible.builtin.include_tasks: "{{ role_path }}/tasks/async.yml" |
| 86 | +- name: "Managing Job Templates | Wait for finish the Job Templates management" |
| 87 | + ansible.builtin.async_status: |
| 88 | + jid: "{{ __job_templates_job_async_result_item.ansible_job_id }}" |
| 89 | + register: __job_templates_job_async_result |
| 90 | + until: __job_templates_job_async_result.finished |
| 91 | + retries: "{{ controller_configuration_job_templates_async_retries }}" |
| 92 | + delay: "{{ controller_configuration_job_templates_async_delay }}" |
88 | 93 | loop: "{{ __job_templates_job_async.results }}" |
89 | 94 | loop_control: |
90 | 95 | loop_var: __job_templates_job_async_result_item |
91 | | - label: "{{ __operation.verb }} Controller Job Template {{ __job_templates_job_async_result_item.__controller_template_item.name }} | Wait for finish the job templates {{ __operation.action }}" |
| 96 | + label: "{{ __operation.verb }} Job Template {{ __job_templates_job_async_result_item }} | Wait for finish the Job Template {{ __operation.action }}" |
92 | 97 | when: not ansible_check_mode and __job_templates_job_async_result_item.ansible_job_id is defined |
93 | 98 | no_log: "{{ controller_configuration_job_templates_secure_logging }}" |
94 | 99 | vars: |
95 | | - __operation: "{{ operation_translate[__job_templates_job_asycn_result_item.__controller_template_item.state | default(platform_state) | default('present')] }}" |
| 100 | + __operation: "{{ operation_translate[__job_templates_job_async_result_item.__controller_template_item.state | default(platform_state) | default('present')] }}" |
96 | 101 | ansible_async_dir: '{{ aap_configuration_async_dir }}' |
97 | | - |
98 | | -- name: Set Job Templates error artifact |
99 | | - when: __templates_error_list is defined |
100 | | - ansible.builtin.set_stats: |
101 | | - data: |
102 | | - job_templates_errors: "{{ __templates_error_list }}" |
103 | | - register: __job_templates_errors_set_stats |
104 | 102 | ... |
0 commit comments