rsync failure

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.

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.

Hi Team,

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

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

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

Isn’t src and dest the same place?

ansible.posix.synchronize:

src: /root

dest: /root

both are in the different hostnames.