issue #414: import test / reproduction.
parent
c286f4f107
commit
574fc27a9c
@ -1,8 +1,9 @@
|
|||||||
|
- import_playbook: multiple_items_loop.yml
|
||||||
- import_playbook: result_binary_producing_json.yml
|
- import_playbook: result_binary_producing_json.yml
|
||||||
- import_playbook: result_binary_producing_junk.yml
|
- import_playbook: result_binary_producing_junk.yml
|
||||||
- import_playbook: result_shell_echo_hi.yml
|
- import_playbook: result_shell_echo_hi.yml
|
||||||
- import_playbook: runner_new_process.yml
|
- import_playbook: runner_new_process.yml
|
||||||
- import_playbook: runner_one_job.yml
|
- import_playbook: runner_one_job.yml
|
||||||
- import_playbook: runner_timeout_then_polling.yml
|
- import_playbook: runner_timeout_then_polling.yml
|
||||||
- import_playbook: runner_with_polling_and_timeout.yml
|
|
||||||
- import_playbook: runner_two_simultaneous_jobs.yml
|
- import_playbook: runner_two_simultaneous_jobs.yml
|
||||||
|
- import_playbook: runner_with_polling_and_timeout.yml
|
||||||
|
@ -0,0 +1,36 @@
|
|||||||
|
# issue #414: verify behaviour of async tasks created in a loop.
|
||||||
|
|
||||||
|
- name: integration/async/multiple_items_loop.yml
|
||||||
|
hosts: test-targets
|
||||||
|
any_errors_fatal: true
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- name: start long running ops
|
||||||
|
become: true
|
||||||
|
shell: "{{item}}"
|
||||||
|
async: 15
|
||||||
|
poll: 0
|
||||||
|
register: jobs
|
||||||
|
with_items:
|
||||||
|
- "sleep 3; echo hi-from-job-1"
|
||||||
|
- "sleep 5; echo hi-from-job-2"
|
||||||
|
|
||||||
|
- name: Ensure static files are collected and compressed
|
||||||
|
async_status:
|
||||||
|
jid: "{{ item.ansible_job_id }}"
|
||||||
|
become: yes
|
||||||
|
register: out
|
||||||
|
until: out.finished
|
||||||
|
retries: 30
|
||||||
|
with_items:
|
||||||
|
- "{{ jobs.results }}"
|
||||||
|
|
||||||
|
- assert:
|
||||||
|
that:
|
||||||
|
- out.results[0].stdout == 'hi-from-job-1'
|
||||||
|
- out.results[0].rc == 0
|
||||||
|
- out.results[0].delta > '0:00:03'
|
||||||
|
|
||||||
|
- out.results[1].stdout == 'hi-from-job-2'
|
||||||
|
- out.results[1].rc == 0
|
||||||
|
- out.results[1].delta > '0:00:05'
|
Loading…
Reference in New Issue