1

Trying some stuff out with Ansible but it seems doing a simple scp is not something trivial.

I checked modules: synchronize, copy, fetch.

These either don't seem to have specifiers for the source host or are not using an ssh tunnel (scp, rsync+ssh).

What I'm trying to do is very simple: scp remotehost:/path/file /tmp/file

With the latter being the host(s) to be configured.

Thanks in advance.

  • 2
    Check out example from the [docs](http://docs.ansible.com/ansible/synchronize_module.html): `synchronize: mode=pull src=rsync://somehost.com/path/ dest=/some/absolute/path/` – Konstantin Suvorov Feb 06 '17 at 10:05
  • 2
    See here: http://stackoverflow.com/questions/25505146/how-to-copy-files-between-two-nodes-using-ansible Note: `rysnc` is required on hosts + `delegate_to` – Zlemini Feb 06 '17 at 12:33
  • Thanks for the responses. I had tried the synchronize above. But that didn't seem to work. In my case the remote where I pull the file from is a FreeBSD machine so in the end I kept it simple and used raw to do the copy. – th3penguinwhisperer Feb 06 '17 at 15:09
  • could you provide some specific error messages? – Bruce Becker Nov 08 '18 at 08:25

0 Answers0