Hi All,

I am running the below code in a playbook which iterates over many hosts. 
This script writes the value of ver.stdout to a file. I am seeing issue 
when I run in in parallel. It is overwriting. It works good when serial:1 
but it consumes long time since we have large number of hosts. 

Any help to run in parallel and improve the time consumption?


- name: Write version output
  local_action: lineinfile create=yes line={{ item }} insertafter=EOF 
dest={{ dest_file }}
  when: ver.stdout != ""
  with_items:
    - "{{ ver.stdout | regex_replace('\r\n' , '#' )}},{{ inventory_hostname 
}}"


Cheers,
Joseph
  

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ed83edbc-4152-4922-86b2-c1e0711a0e1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to