I want to copy multiple files in playbooks, Currently i'm doing one by one
- name: Copy tomcat to target server
copy: src=files/apache-tomcat-7.0.61.tar.gz
dest=/tmp/apache-tomcat-7.0.61.tar.gz owner=root group=azureuser mode=0644
when: ansible_os_family == 'Suse' or ansible_os_family == 'RedHat'
- name: Copy file1 to target server
copy: src=files/file1 dest=/opt/file1 owner=azureuser group=root
mode=0644
when: ansible_os_family == 'Suse' or ansible_os_family == 'RedHat'
Is there a way to copy it recursively for many files with different
destinations similar to below
- name: Install necessary package group
yum: name="{{ item }}" state=present
with_items:
- "libselinux-python"
- "git"
- "ksh"
- "httpd"
- "java-1.7.0-openjdk-devel"
when: ansible_os_family == 'RedHat'
--
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/33474130-4cff-4c40-ba35-e9786bb3e818%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.