Skip to content

Commit 3efb11e

Browse files
erwilanabadger
authored andcommitted
synchronize: Exclude ssh_args from quoting
Makes it possible again to pass more than one argument via ssh_args to the synchronize module.
1 parent 9cc47df commit 3efb11e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ansible/modules/files/synchronize.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,9 +476,9 @@ def main():
476476
ssh_cmd.extend(['-o', 'Port=%s' % dest_port])
477477
if not verify_host:
478478
ssh_cmd.extend(['-o', 'StrictHostKeyChecking=no'])
479-
if ssh_args:
480-
ssh_cmd.append(ssh_args)
481479
ssh_cmd_str = ' '.join(shlex_quote(arg) for arg in ssh_cmd)
480+
if ssh_args:
481+
ssh_cmd_str += ' %s' % ssh_args
482482
cmd.append('--rsh=%s' % ssh_cmd_str)
483483

484484
if rsync_path:

0 commit comments

Comments
 (0)