# rsync failure

**URL:** <https://forum.ansible.com/t/rsync-failure/36927>\
**Category:** Ansible Project\
**Created:** [August 1, 2022, 7:04am UTC](https://forum.ansible.com/t/rsync-failure/36927 "2022-08-01T07:04:05Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ashok-2017](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ashok-2017/32/659_2.png) [@Ashok-2017](https://forum.ansible.com/u/Ashok-2017)\
**Post date:** [August 1, 2022, 7:04am UTC](https://forum.ansible.com/t/rsync-failure/36927/1 "2022-08-01T07:04:05Z")

</div>



---

<div class="post-metadata">

**Author:** ![dulhaver](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dulhaver/32/1061_2.png) [@dulhaver](https://forum.ansible.com/u/dulhaver)\
**Post date:** [August 1, 2022, 7:37am UTC](https://forum.ansible.com/t/rsync-failure/36927/2 "2022-08-01T07:37:33Z")

</div>

my guess: Ansible detects that the host has no rsync installed, so the TASK can not be executed.  
So you'd you have to create a preceeding (package/yum/apt) TASK that makes sure rsync is installed on the hosts in order to make this work.

---

<div class="post-metadata">

**Author:** ![Ashok-2017](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ashok-2017/32/659_2.png) [@Ashok-2017](https://forum.ansible.com/u/Ashok-2017)\
**Post date:** [August 1, 2022, 10:23am UTC](https://forum.ansible.com/t/rsync-failure/36927/3 "2022-08-01T10:23:36Z")

</div>



---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [August 1, 2022, 10:48am UTC](https://forum.ansible.com/t/rsync-failure/36927/4 "2022-08-01T10:48:02Z")

</div>

The listeral string “inventory hostname” is not a valid hostname. Fix that.

Also, “become\_method: sudo” and “gather\_facts: true” are both the same as the defaults, so you can leave that out.

---

<div class="post-metadata">

**Author:** ![Ashok-2017](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ashok-2017/32/659_2.png) [@Ashok-2017](https://forum.ansible.com/u/Ashok-2017)\
**Post date:** [August 1, 2022, 11:07am UTC](https://forum.ansible.com/t/rsync-failure/36927/5 "2022-08-01T11:07:03Z")

</div>

Hi Team,

whatever i’ve mentioned the inventory hostname just ref i.e not the actual one.

---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [August 1, 2022, 12:37pm UTC](https://forum.ansible.com/t/rsync-failure/36927/6 "2022-08-01T12:37:30Z")

</div>

Well in that case you will have to find out for yourself why it doesn’t work.

---

<div class="post-metadata">

**Author:** ![jcpetro](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@jcpetro](https://forum.ansible.com/u/jcpetro)\
**Post date:** [August 1, 2022, 12:47pm UTC](https://forum.ansible.com/t/rsync-failure/36927/7 "2022-08-01T12:47:28Z")

</div>

Have you run the playbook in verbose mode to get more detail? Maybe there’s a mis-spelling in the inventory hostname you used or something in the inventory.

The only other idea I have is to copy/paste the msg section that starts with “Could” into your search engine of choice and see what comes up there.

–John

---

<div class="post-metadata">

**Author:** ![shearn](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@shearn](https://forum.ansible.com/u/shearn)\
**Post date:** [August 1, 2022, 1:13pm UTC](https://forum.ansible.com/t/rsync-failure/36927/8 "2022-08-01T13:13:07Z")

</div>

Isn’t src and dest the same place?

ansible.posix.synchronize:

src: /root

dest: /root

---

<div class="post-metadata">

**Author:** ![Ashok-2017](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ashok-2017/32/659_2.png) [@Ashok-2017](https://forum.ansible.com/u/Ashok-2017)\
**Post date:** [August 2, 2022, 1:59am UTC](https://forum.ansible.com/t/rsync-failure/36927/9 "2022-08-02T01:59:01Z")

</div>

both are in the different hostnames.
