diff --git a/changelogs/fragments/65698-synchronize-docker-controller-managed.yml b/changelogs/fragments/65698-synchronize-docker-controller-managed.yml new file mode 100644 index 00000000000..60180142e70 --- /dev/null +++ b/changelogs/fragments/65698-synchronize-docker-controller-managed.yml @@ -0,0 +1,2 @@ +bugfixes: + - synchronize - allow data to be passed between two managed nodes when using the docker connection plugin (https://github.com/ansible/ansible/pull/65698) diff --git a/lib/ansible/plugins/action/synchronize.py b/lib/ansible/plugins/action/synchronize.py index 0c0a89cbf0e..0385cc9a72d 100644 --- a/lib/ansible/plugins/action/synchronize.py +++ b/lib/ansible/plugins/action/synchronize.py @@ -391,7 +391,7 @@ 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', 'buildah']: + if self._remote_transport in ['docker', 'buildah'] and not use_delegate: # Replicate what we do in the module argumentspec handling for lists if not isinstance(_tmp_args.get('rsync_opts'), MutableSequence): tmp_rsync_opts = _tmp_args.get('rsync_opts', [])