I'm trying to copy a bunch of files, recurisvely, from my Ansible control 
machine to the inventory target.  The 'synchronize' module (in 1.5) sounds 
like it does just what I need:

# Synchronization of src on the control machine to dest on the remote hosts
synchronize: src=some/relative/path dest=/some/absolute/path


When I use it, however, it tries to copy from the target machine to the target 
machine.

- synchronize:  src=/Users/chris/Projects/smd/ dest=/tmp/

msg: rsync: change_dir "/Users/chris/Projects/smd" failed: No such file or 
directory (2)

/Users/chris/Projects/smd does exist on my controller, but not my target; it 
appears it's treating both src and dest on the target.

If I try and make this a local_action, it tries to copy from and *to* my 
ansible controller machine

- local_action: synchronize src=/Users/chris/.MacOSX dest=/tmp

Does copy my local machine's homedir config info to my local machine's /tmp/ dir

I've read a bunch of the threads on this but it's not clear how to invoke this 
common operation, abut more importantly, the doc example that state "src on 
control machine to dest on remote hosts" is not what this module is actually 
doing.

I've thrown some 'pdb' into the synchronize.py module and see that (without 
local_action) it does create an rsync command, copy a file with that command to 
the remote, then run it there, so it makes sense that it would be doing src and 
dest on the remote -- contrary to the doc example.


Any suggestions?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/676ed512-7e6a-406d-ab95-0da402a83f28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to