Browse code

Cascade ssh_*args configurations in synchronize instead of limiting to just ssh_args. See https://github.com/ansible/ansible-modules-core/issues/3370

Matt Martz authored on 2016/04/07 00:27:24
Showing 1 changed files
... ...
@@ -322,7 +322,12 @@ class ActionModule(ActionBase):
322 322
             self._task.args['rsync_path'] = '"%s"' % rsync_path
323 323
 
324 324
         if use_ssh_args:
325
-            self._task.args['ssh_args'] = C.ANSIBLE_SSH_ARGS
325
+            ssh_args = [
326
+                getattr(self._play_context, 'ssh_args', ''),
327
+                getattr(self._play_context, 'ssh_common_args', ''),
328
+                getattr(self._play_context, 'ssh_extra_args', ''),
329
+            ]
330
+            self._task.args['ssh_args'] = ' '.join([a for a in ssh_args if a])
326 331
 
327 332
         # run the module and store the result
328 333
         result.update(self._execute_module('synchronize', task_vars=task_vars))