From 3efb11e22590c513f65fadef8f84e8df6591fe0f Mon Sep 17 00:00:00 2001 From: Erwin Lang Date: Thu, 30 Mar 2017 23:53:55 +0200 Subject: [PATCH] synchronize: Exclude ssh_args from quoting Makes it possible again to pass more than one argument via ssh_args to the synchronize module. --- lib/ansible/modules/files/synchronize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/files/synchronize.py b/lib/ansible/modules/files/synchronize.py index 4d3e92a679a..3afd36ccb09 100644 --- a/lib/ansible/modules/files/synchronize.py +++ b/lib/ansible/modules/files/synchronize.py @@ -476,9 +476,9 @@ def main(): ssh_cmd.extend(['-o', 'Port=%s' % dest_port]) if not verify_host: ssh_cmd.extend(['-o', 'StrictHostKeyChecking=no']) - if ssh_args: - ssh_cmd.append(ssh_args) ssh_cmd_str = ' '.join(shlex_quote(arg) for arg in ssh_cmd) + if ssh_args: + ssh_cmd_str += ' %s' % ssh_args cmd.append('--rsh=%s' % ssh_cmd_str) if rsync_path: