Open felixfontein opened 23 hours ago
The crash is caused by https://github.com/ansible-collections/community.docker/blob/d8548ef55fc719b1537b99570ea2d4960cd6ba06/plugins/modules/docker_swarm_info.py#L273 assuming that Mode
is always set. Changing that line to if item_record.get('Mode') == 'Global':
should fix the issue.
Fix: #1003
Copied from https://github.com/ansible-collections/community.docker/issues/28#issuecomment-2511217556
This is also an issue for
docker_swarm_info
The code is currently checking for only
Replicated
andGlobal
as the modes for a service. These are however not the only modes that exists anymore, there is alsoReplicatedJob
andGlobalJob
. When either of those types of services exists at the moment, thendocker_swarm_info
fails.https://github.com/ansible-collections/community.docker/blob/d8548ef55fc719b1537b99570ea2d4960cd6ba06/plugins/modules/docker_swarm_info.py#L316
Traceback:
Example of parial output from
docker service inspect
ofReplicatedJob
: