Hi,

I am trying to copy multiple files to different locations using with_items. 
Could someone please help me with this

*vars: main.yml*

wars:
file1.war
file2.war
file3.war
file4.war

dest_path:
/tmp/{wars}


*tasks- main.yml*
---
- hosts: all
  name: copy file
    copy: src={{ item.src }} dest={{ item.dest }}
    with_items:
      - { src: '{{ wars }}', dest: '{{ dest_path }}' }

My idea is file1.war should go to /tmp/file1 folder etc

-- 
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/87ce7773-9663-474a-9af5-dbbe4bd9f367%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to