Hello

I have the unique situation

I am running a playbook on list of hosts ( hostA, hostB, hostC ) for collecting the system current health and dump the data into the directory ( /var/tmp/<hostname.daily> on each ansible managed host.
Now I need to copy the collected data from all hosts onto another remote host ( from hosta/hostB to hostC ) but the passwordless login is not configured between these 2 servers hence the playbook stuck at copy task.
Let me know if anyone has any idea to resolve the issue

Hello

I have the unique situation

I am running a playbook on list of hosts ( hostA, hostB, hostC ) for collecting the system current health and dump the data into the directory ( /var/tmp/<hostname.daily> on each ansible managed host.
Now I need to copy the collected data from all hosts onto another remote host ( from hosta/hostB to hostC ) but the passwordless login is not configured between these 2 servers hence the playbook stuck at copy task.
Let me know if anyone has any idea to resolve the issue

You need to configure passwordless logins between those 2 servers.

But, the copy task cannot be used to copy between two remote hosts, which is what you seem to be doing.
However “passwordless login is not configured” could also indicate you’re not using the copy module.

You can see that I’m already having to guess what you’re exactly doing…
Please send the exact and total playbook, and the output.

Dick

Hello Dick,

Here is the actual playbook

  • hosts: test
    tasks:
  • name: copy the data between 2 remote servers
    synchronize:
    src: “/var/tmp/test1”
    dest: “/tmp/test1.{{ inventory_hostname }}”
    mode: pull
    archive: yes
    dirs: yes
    perms: yes
    recursive: yes
    times: yes
    rsync_path: /usr/bin/rsync
    private_key: ~/.ssh/id_rsa
    changed_when: False
    delegate_to: < Server name where I need to dump the data >