From bce79c67c3657ccf24bea9685eb158c5aab70e2e Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Wed, 6 Apr 2016 10:27:24 -0500 Subject: [PATCH] Cascade ssh_*args configurations in synchronize instead of limiting to just ssh_args. See https://github.com/ansible/ansible-modules-core/issues/3370 --- lib/ansible/plugins/action/synchronize.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ansible/plugins/action/synchronize.py b/lib/ansible/plugins/action/synchronize.py index 0a74ed2d95d..33b7a89fa1a 100644 --- a/lib/ansible/plugins/action/synchronize.py +++ b/lib/ansible/plugins/action/synchronize.py @@ -318,7 +318,12 @@ class ActionModule(ActionBase): self._task.args['rsync_path'] = '"%s"' % rsync_path if use_ssh_args: - self._task.args['ssh_args'] = C.ANSIBLE_SSH_ARGS + ssh_args = [ + getattr(self._play_context, 'ssh_args', ''), + getattr(self._play_context, 'ssh_common_args', ''), + getattr(self._play_context, 'ssh_extra_args', ''), + ] + self._task.args['ssh_args'] = ' '.join([a for a in ssh_args if a]) # run the module and store the result result.update(self._execute_module('synchronize', task_vars=task_vars))