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

This commit is contained in:
Chris Houseknecht 2016-12-10 10:51:03 -05:00 committed by GitHub
parent 9f58e69d63
commit 65491cc839

View file

@ -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: