From 65491cc839c99aed97f9a8a507c43b8e7dde8683 Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Sat, 10 Dec 2016 10:51:03 -0500 Subject: [PATCH] For docker add --blocking-io only when missing (#19171) --- lib/ansible/plugins/action/synchronize.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ansible/plugins/action/synchronize.py b/lib/ansible/plugins/action/synchronize.py index b92490039b5..2ff84b4f8d2 100644 --- a/lib/ansible/plugins/action/synchronize.py +++ b/lib/ansible/plugins/action/synchronize.py @@ -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: