summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwin Lang <erwilan@posteo.net>2017-03-30 23:53:55 +0200
committerToshio Kuratomi <a.badger@gmail.com>2017-03-30 19:41:18 -0700
commit131729726fe9e2b7a3817af6eb0e80e058e648bf (patch)
treeb9f04f38a8f22f55dc526b0838e356575c309c5f
parent5744abfe4eb1afe53644175b51ab531a3b9af3e0 (diff)
downloadansible-131729726fe9e2b7a3817af6eb0e80e058e648bf.tar.gz
synchronize: Exclude ssh_args from quoting
Makes it possible again to pass more than one argument via ssh_args to the synchronize module. (cherry picked from commit 3efb11e22590c513f65fadef8f84e8df6591fe0f)
-rw-r--r--lib/ansible/modules/files/synchronize.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ansible/modules/files/synchronize.py b/lib/ansible/modules/files/synchronize.py
index 6af81079ba..3db97a87fc 100644
--- a/lib/ansible/modules/files/synchronize.py
+++ b/lib/ansible/modules/files/synchronize.py
@@ -463,9 +463,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: