Michael: That is what I was doing and after testing some more its not working out. I just setup a test area (not in the office this week) and did some additional investigating. It seems that the connection is established that changing the delegate in the inject data has no effect. See this commit here: https://github.com/tima/ansible/commit/1bf90df9655fb745dcc687c392d9d0f6b83e7778
Here is the verbose output with some debugging message in my action modules run:
$ ansible -i rsync.ini -m synchronize -a “src=‘./hacking’ dest=‘/tmp/’” --private-key ~/.ssh/gsg-foo.pem -vvv -u ubuntu -c ssh all
<foo.appnel.com> ESTABLISH CONNECTION FOR USER: ubuntu
<foo.appnel.com> EXEC [‘ssh’, ‘-tt’, ‘-q’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/tmp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘StrictHostKeyChecking=no’, ‘-o’, ‘Port=22’, ‘-o’, ‘IdentityFile=/Users/tima/.ssh/gsg-foo.pem’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ubuntu’, ‘-o’, ‘ConnectTimeout=10’, ‘foo.appnel.com’, “/bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-1374122730.46-187893212842113 && chmod a+rx $HOME/.ansible/tmp/ansible-1374122730.46-187893212842113 && echo $HOME/.ansible/tmp/ansible-1374122730.46-187893212842113’”]
DEBUG in synchronize run method now
DEBUG no delegate defined – setting to 127.0.0.1
DEBUG remote handling 127.0.0.1 to foo.appnel.com
<foo.appnel.com> PUT /var/folders/42/xv4f750d1sb3k8l4vrjn1sz00000gn/T/tmpzzaWBE TO /home/ubuntu/.ansible/tmp/ansible-1374122730.46-187893212842113/synchronize
<foo.appnel.com> EXEC [‘ssh’, ‘-tt’, ‘-q’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/tmp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘StrictHostKeyChecking=no’, ‘-o’, ‘Port=22’, ‘-o’, ‘IdentityFile=/Users/tima/.ssh/gsg-foo.pem’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ubuntu’, ‘-o’, ‘ConnectTimeout=10’, ‘foo.appnel.com’, “/bin/sh -c ‘/usr/bin/python /home/ubuntu/.ansible/tmp/ansible-1374122730.46-187893212842113/synchronize; rm -rf /home/ubuntu/.ansible/tmp/ansible-1374122730.46-187893212842113/ >/dev/null 2>&1’”]
Despite setting inject[‘delete_to’] to the localhost Ansible does a PUT and EXEC of the module file. Do you or any one recall a change in recent release that moved the connection being established a head of the action module running?