community.general.docker_stack_info – Return information on a docker stack

Note

This plugin is part of the community.general collection (version 1.3.2).

To install it use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.docker_stack_info.

New in version 1.0.0: of community.general

Synopsis

  • Retrieve information on docker stacks using the docker stack command on the target node (see examples).

Examples

- name: Shows stack info
  community.general.docker_stack_info:
  register: result

- name: Show results
  ansible.builtin.debug:
    var: result.results

Return Values

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"}]


Authors

  • Jose Angel Munoz (@imjoseangel)

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/general/docker_stack_info_module.html