Commit 4f4df29c by Matt Martz

Add ability to specify using ssh_args in synchronize for v2

parent cee7cd5d
...@@ -22,6 +22,8 @@ import os.path ...@@ -22,6 +22,8 @@ import os.path
from ansible.plugins.action import ActionBase from ansible.plugins.action import ActionBase
from ansible.utils.boolean import boolean from ansible.utils.boolean import boolean
from ansible import constants
class ActionModule(ActionBase): class ActionModule(ActionBase):
...@@ -81,6 +83,7 @@ class ActionModule(ActionBase): ...@@ -81,6 +83,7 @@ class ActionModule(ActionBase):
src = self._task.args.get('src', None) src = self._task.args.get('src', None)
dest = self._task.args.get('dest', None) dest = self._task.args.get('dest', None)
use_ssh_args = self._task.args.pop('use_ssh_args', None)
# FIXME: this doesn't appear to be used anywhere? # FIXME: this doesn't appear to be used anywhere?
local_rsync_path = task_vars.get('ansible_rsync_path') local_rsync_path = task_vars.get('ansible_rsync_path')
...@@ -162,6 +165,9 @@ class ActionModule(ActionBase): ...@@ -162,6 +165,9 @@ class ActionModule(ActionBase):
if rsync_path: if rsync_path:
self._task.args['rsync_path'] = '"%s"' % rsync_path self._task.args['rsync_path'] = '"%s"' % rsync_path
if use_ssh_args:
self._task.args['ssh_args'] = constants.ANSIBLE_SSH_ARGS
# run the module and store the result # run the module and store the result
result = self._execute_module('synchronize') result = self._execute_module('synchronize')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment