mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 20:01:25 -07: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:
parent
e2856127f6
commit
81d58cfef6
5 changed files with 93 additions and 33 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue