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:
Felix Fontein
2019-02-23 23:18:17 +01:00
committed by ansibot
parent e2856127f6
commit 81d58cfef6
5 changed files with 93 additions and 33 deletions

View File

@@ -1,10 +1,14 @@
---
- block:
- shell: "docker info --format '{% raw %}{{json .}}{% endraw %}' | python -m json.tool"
- name: Make sure we're not already using Docker swarm
docker_swarm:
state: absent
force: true
- shell: "docker info --format '{% raw %}{{json .}}{% endraw %}' | python -m json.tool"
- name: Create a Swarm cluster
docker_swarm:
state: present