-
- hosts: gale remote_user: root gather_facts: no name: copy files tasks: - name: copy files copy: src: "{{ item.src }}" dest: "{{ item.dest }}" with_items: - { src: salamander, dest: /opt } - { src: salamander.pub, dest: /mnt }
-
glob
--- - hosts: gale remote_user: root gather_facts: no vars: filename: ~/salamander* tasks: - name: copy files with glob copy: src={{ item }} dest=/tmp with_fileglob: - "{{ filename }}"