mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Do not set docker use to None. (#18706)
The user variable defaults to None, and was being passed in as a user named None. This was breaking rsync unless a specific user was set. Fixes 16306
This commit is contained in:
parent
599e016315
commit
8e38f7475f
1 changed files with 4 additions and 1 deletions
|
@ -354,7 +354,10 @@ class ActionModule(ActionBase):
|
||||||
# If launching synchronize against docker container
|
# If launching synchronize against docker container
|
||||||
# use rsync_opts to support container to override rsh options
|
# use rsync_opts to support container to override rsh options
|
||||||
if self._remote_transport in [ 'docker' ]:
|
if self._remote_transport in [ 'docker' ]:
|
||||||
|
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'] = "--rsh='%s exec -u %s -i'" % (self._docker_cmd, user)
|
||||||
|
else:
|
||||||
|
self._task.args['rsync_opts'] = "--rsh='%s exec -i'" % (self._docker_cmd)
|
||||||
|
|
||||||
# run the module and store the result
|
# run the module and store the result
|
||||||
result.update(self._execute_module('synchronize', task_vars=task_vars))
|
result.update(self._execute_module('synchronize', task_vars=task_vars))
|
||||||
|
|
Loading…
Reference in a new issue