Note
This plugin is part of the community.docker collection (version 1.10.0).
You might already have this collection installed if you are using the ansible
package. It is not included in ansible-core
. To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.docker
.
To use it in a playbook, specify: community.docker.docker_stack_info
.
docker stack
command on the target node (see examples).- name: Shows stack info community.docker.docker_stack_info: register: result - name: Show results ansible.builtin.debug: var: result.results
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
results list / elements=string | always | List of dictionaries containing the list of stacks or tasks associated to a stack name. Sample: "results": [{"name":"grafana","namespace":"default","orchestrator":"Kubernetes","services":"2"}] |
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/docker/docker_stack_info_module.html