Run into a similar problem documented at <https://github.com/ansible/ansible/issues/5240> and
<https://groups.google.com/d/msg/ansible-project/gT2eie6SVuU/MwUd44Eh15sJ>
I’m not sure if this is a personal problem or a regression so I posting here first.
I’m trying to synchronize a local directory, /var/lib/projects/convert_station_software, to several user’s local home directories.
I am using vagrant for testing.
$ ansible --version
ansible 2.2.0 (devel 7b58240654) last updated 2016/05/05 12:25:39 (GMT -500)
lib/ansible/modules/core: (devel 9be870bb2a) last updated 2016/05/05 12:49:00 (GMT -500)
lib/ansible/modules/extras: (devel 77eee2b6ca) last updated 2016/05/05 12:48:27 (GMT -500)
config file =
configured module search path = Default w/o overrides
$ vagrant --version
Vagrant 1.8.1
Control host is OS X 10.11.4
Managed host is OpenSUSE 42.1
- name: synchronize convert station software to convert users
synchronize: >
src=“{{ convert_station_software_local_repo }}/”
dest=“{{ item.home }}”
archive=“no”
recursive=“yes”
rsync_opts=“–exclude=.git --exclude=.gitignore”
with_items:
- “{{ support_users }}”
delegate_to: “{{ inventory_hostname }}”
<127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: vagrant
<127.0.0.1> SSH: EXEC ssh -C -vvv -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=2222 -o ‘IdentityFile=“/Users/tanner/.vagrant.d/insecure_private_key”’ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=30 -o ControlPath=/Users/tanner/.ansible/cp/ansible-ssh-%h-%p-%r -tt 127.0.0.1 ‘/bin/sh -c ‘"’“‘LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1462856232.36-239016284975772/synchronize; rm -rf “/home/vagrant/.ansible/tmp/ansible-tmp-1462856232.36-239016284975772/” > /dev/null 2>&1’”’"‘’
failed: [testing_openSUSE → None] <snip stuff I’d like to keep private> “msg”: “Warning: Identity file /Users/tanner/.vagrant.d/insecure_private_key not accessible: No such file or directory.\nssh: connect to host 127.0.0.1 port 2222: Connection refused\r\nrsync: connection unexpectedly closed (0 bytes received so far) [Receiver]\nrsync error: error in rsync protocol data stream (code 12) at io.c(235) [Receiver=3.1.0]\n”, “rc”: 12}
Google shows me something similar to this has shown up before (vagrant vs synchronize module).
The question is why ssh at all? Why not some like “rsync -av /var/lib/projects/convert_station_software /home/user1”?
Am I missing something simple?