mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
docker_swarm: hopefully fix debug CI problems, and fix check mode (#52825)
* Let's see some debug output. * Also check LocalNodeState. * Improve tests. * Actually implement check mode. * Add changelog. * Add pretty-printing and more output.
This commit is contained in:
@@ -62,6 +62,8 @@ class AnsibleDockerSwarmClient(AnsibleDockerClient):
|
||||
swarm_info = json.loads(json_str)
|
||||
if swarm_info['Swarm']['NodeID']:
|
||||
return True
|
||||
if swarm_info['Swarm']['LocalNodeState'] in ('active', 'pending', 'locked'):
|
||||
return True
|
||||
return False
|
||||
else:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user