# synchronize: link\_stat failed

**URL:** <https://forum.ansible.com/t/synchronize-link-stat-failed/36474>\
**Category:** Ansible Project\
**Created:** [March 24, 2022, 6:54am UTC](https://forum.ansible.com/t/synchronize-link-stat-failed/36474 "2022-03-24T06:54:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robin\_Kluth](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robin\_Kluth](https://forum.ansible.com/u/Robin_Kluth)\
**Post date:** [March 24, 2022, 6:54am UTC](https://forum.ansible.com/t/synchronize-link-stat-failed/36474/1 "2022-03-24T06:54:23Z")

</div>

Hi.

I have:

- name: Copy files to BackupDMZ  
ansible.posix.synchronize:  
src: /opt/docusnap/\*.xml  
dest: /opt/docusnap\_proxy/  
mode: pull  
rsync\_opts:
- “–timeout=30”  
delegate\_to: 172.31.10.84

which workls for all hosts except the 172.31.10.84 itself. Ansible created the following cmd for this server:

/usr/bin/rsync --delay-updates -F --compress --archive --timeout=30 --out-format=‘\<\>%i %n%L’ /opt/docusnap/\*.xml /opt/docusnap\_proxy/

Seems ok, but I get:

rsync: link\_stat "/opt/docusnap/\*.xml" failed: No such file or directory (2)\nrsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]\n

But when I fire this cmd myself via root on that server, all is ok. Both folders exist.

Any idea whats wrong here?

Debug out: [https://pastebin.com/0RmKanCY](https://pastebin.com/0RmKanCY)

---

<div class="post-metadata">

**Author:** ![Robin\_Kluth](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robin\_Kluth](https://forum.ansible.com/u/Robin_Kluth)\
**Post date:** [March 24, 2022, 1:07pm UTC](https://forum.ansible.com/t/synchronize-link-stat-failed/36474/2 "2022-03-24T13:07:41Z")

</div>

Ended up with a simple cp shell command for that host only.
