mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 04:11:25 -07:00
Add --blocking-io option when docker connection (#19140)
This commit is contained in:
parent
b1ea79af51
commit
b02491ba70
1 changed files with 5 additions and 2 deletions
|
@ -354,10 +354,13 @@ class ActionModule(ActionBase):
|
|||
# If launching synchronize against docker container
|
||||
# use rsync_opts to support container to override rsh options
|
||||
if self._remote_transport in [ 'docker' ]:
|
||||
if not isinstance(self._task.args.get('rsync_opts'), list):
|
||||
self._task.args['rsync_opts'] = []
|
||||
self._task.args['rsync_opts'].append('--blocking-io')
|
||||
if user is not None:
|
||||
self._task.args['rsync_opts'] = "--rsh='%s exec -u %s -i'" % (self._docker_cmd, user)
|
||||
self._task.args['rsync_opts'].append("--rsh='%s exec -u %s -i'" % (self._docker_cmd, user))
|
||||
else:
|
||||
self._task.args['rsync_opts'] = "--rsh='%s exec -i'" % (self._docker_cmd)
|
||||
self._task.args['rsync_opts'].append("--rsh='%s exec -i'" % self._docker_cmd)
|
||||
|
||||
# run the module and store the result
|
||||
result.update(self._execute_module('synchronize', task_vars=task_vars))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue