mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
synchronize: quote private_key (#21570)
otherwise rsync will fail when trying to access a key with spaces: fatal: [default]: FAILED! => {"changed": false, "cmd": "/usr/bin/rsync --delay-updates -F --compress --archive --rsh 'ssh -i /home/user/Some Folder/.vagrant/machines/default/libvirt/private_key -S none -o StrictHostKeyChecking=no -o Port=22' --out-format='<<CHANGED>>%i %n%L' \"/etc/issue\" \"vagrant@192.168.121.10:/tmp/issue2\"", "failed": true, "msg": "Warning: Identity file /home/user/Some not accessible: No such file or directory.\nssh: Could not resolve hostname folder/.vagrant/machines/default/libvirt/private_key: No address associated with hostname\r\nrsync: connection unexpectedly closed (0 bytes received so far) [sender]\nrsync error: unexplained error (code 255) at io.c(226) [sender=3.1.2]\n", "rc": 255}
This commit is contained in:
parent
e77964f9da
commit
d3d1aa2dca
1 changed files with 1 additions and 1 deletions
|
@ -438,7 +438,7 @@ def main():
|
|||
if private_key is None:
|
||||
private_key = ''
|
||||
else:
|
||||
private_key = '-i '+ private_key
|
||||
private_key = '-i "%s"' % private_key
|
||||
|
||||
ssh_opts = '-S none'
|
||||
|
||||
|
|
Loading…
Reference in a new issue