[web]
server1
server2
main.yaml
- hosts: web
tasks:
- name: copy files on remote machine
synchronize:
src: /home/anil/anilfolder/
dest: /home/anil/anilbackup/
delegate_to: "{{ inventory_hostname }}"
i wrote like above. but sometime i got synchronizes error. is any other alternative way to copy files and folders from one location to another location on remote machine.please give the solution as soon as possible