For docker add --blocking-io only when missing (#19171)

pull/19396/head
Chris Houseknecht 8 years ago committed by GitHub
parent 9f58e69d63
commit 65491cc839

@ -355,8 +355,9 @@ class ActionModule(ActionBase):
# 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')
self._task.args['rsync_opts'] = self._task.args.get('rsync_opts', '').split(' ')
if '--blocking-io' not in self._task.args['rsync_opts']:
self._task.args['rsync_opts'].append('--blocking-io')
if user is not None:
self._task.args['rsync_opts'].append("--rsh='%s exec -u %s -i'" % (self._docker_cmd, user))
else:

Loading…
Cancel
Save