Skip to content

Commit 678508d

Browse files
Revert job template to standard async
1 parent 92673ad commit 678508d

File tree

1 file changed

+9
-11
lines changed
  • roles/controller_job_templates/tasks

1 file changed

+9
-11
lines changed

roles/controller_job_templates/tasks/main.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,22 +83,20 @@
8383
error_flag: true
8484
when: ansible_check_mode and __job_templates_job_async.failed is defined and __job_templates_job_async.failed
8585

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 }}"
8893
loop: "{{ __job_templates_job_async.results }}"
8994
loop_control:
9095
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 }}"
9297
when: not ansible_check_mode and __job_templates_job_async_result_item.ansible_job_id is defined
9398
no_log: "{{ controller_configuration_job_templates_secure_logging }}"
9499
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')] }}"
96101
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
104102
...

0 commit comments

Comments
 (0)