Hi,

I am trying to run a long running task asynchronously and monitor results 
at the end. (My target are not windows. I am just passing in windows system 
information to target linux host)
My tasks don't run asynchronously. They run one after another. 

I include another file with two tasks in it that run one after another. 

What am I doing wrong here?


---
# Tasks File: main.yml
-
    name: 'IaaS Wndows Pre Requisites'
    include: iaas-windows-pre-requisites.yml
    tags:
        - iaas_windows_pre_requisites_check_and_fix_all
    vars:
        server_name: '{{item.server_name}}'
        server_role: '{{item.server_role}}'
    register: result
    async: 5400
    poll: 0
    with_items:
        - { server_name: '{{common.vra_web_primary_hostname}}', 
server_role: 'Website'}
        - { server_name: '{{common.vra_web_secondary_hostname}}', 
server_role: 'Website'}
        - { server_name: '{{common.vra_manager_primary_hostname}}', 
server_role: 'ManagerService'}
        - { server_name: '{{common.vra_manager_secondary_hostname}}', 
server_role: 'ManagerService'}
        - { server_name: '{{common.vra_proxy_agent_primary_hostname}}', 
server_role: 'Agent'}
        - { server_name: '{{common.vra_proxy_agent_secondary_hostname}}', 
server_role: 'Agent'}
        - { server_name: '{{common.vra_worker_primary_hostname}}', 
server_role: 'Dem'}
        - { server_name: '{{common.vra_worker_secondary_hostname}}', 
server_role: 'Dem'}
        

- name: Wait for all tasks to complete
  tags:
    - wait_for_all_iaas_pre_req_tasks_to_complete
  async_status: jid={{ item.ansible_job_id }}
  register: task_result
  until: task_result.finished
  retries: 180
  delay: 30
  with_items: "{{ result.results }}"
# -

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b036657c-62c8-42f4-b700-58e39553f7f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to