On 11. okt. 2016 22:31, novice1...@gmail.com wrote:
#!/usr/bin/env ansible-playbook
---
vars:
  src_dir: /path/files
hosts: {{ targets }}
tasks:
  - name: copying files
    command: "rsync -avrcz X:{{ src_dir }}/{{ artifacts }} {{ dest_dir }}"

My command line:

./playbook.yml -e '{"targets": "targets", "artifacts" : "{file1,file2,dir/file_x}", 
"dest_dir": "/yserv/dest/path"}'

This works and I am able to parallelize pretty decently, but I keep getting:

[WARNING]: Consider using synchronize module rather than running rsync

You can silence the messages by setting "warn: false" on the command task.
Can also be turn off globally by setting "command_warnings = False" in ansible.cfg

--
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/4fc5199f-7094-fad8-e1fa-049e411600e3%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to