I was trying to do this via ssh or scp but that's not working (see
https://groups.google.com/forum/#!msg/ansible-project/WPVGypBbwlU/mYN5B4wp4ogJ).
I need to transfer a file on one server (who's ip is determined via a
variable and isn't necessarily being managed by ansible) to another
ansible managed server.
I tried using something like this:
- name: Copy file
command: 'scp /tmp/file.tar.gz {{ ansible_all_ipv4_addresses[0]
}}:/tmp/file.tar.gz'
delegate_to: '{{ other_host }}'
Like my problems in the above mentioned discussion this just hangs
when run via ansible, but runs fine when executed as the same user on
other_host.
I was just wondering if there is a better way. I could break it up
into 2 steps with a fetch and copy but my control server is pretty
small and these files are going to be pretty large. Surely other
people have automated the movement of large files in their systems
with ansible, right?