Hi Olstad,

I tried with async but I am getting the below error. Could you please help.

Playbook.yml

---
- hosts: all
  tasks:
    - name: Copying files
      copy: src={{ item.src }} dest={{ item.dest }}
      with_items:
        - { src: '/tmp/abc.war', dest: '/tmp/abc' }
        - { src: '/tmp/def.war', dest: '/tmp/def' }
        - { src: '/tmp/xyz.war', dest: '/tmp/xyz' }
      async: 60
      poll: 0

Error:

failed: (item={u'dest': u'/tmp/hr', u'src': u'/tmp/abc/abc.war'}) => 
{"item": {"dest": "/tmp/abc", "src": "/tmp/abc/abc.war"}, "msg": "async is 
not supported for this task."}


On Saturday, November 24, 2018 at 12:18:56 AM UTC+5:30, Kai Stian Olstad 
wrote:
>
> On Friday, 23 November 2018 19:15:35 CET [email protected] 
> <javascript:> wrote: 
> > Can we copy or delete files in parallel instead of sequence for 
> different 
> > locations when using with_items. 
>
> Check out async 
>
>
> -- 
> Kai Stian Olstad 
>
>
>

-- 
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/623f3880-42f5-4510-bad4-e0ce603d20f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to