summaryrefslogtreecommitdiffstats
path: root/roles/openshift_health_checker/library/docker_info.py
blob: 7f712bcff1d18549ecaf75989d56c2a4620579f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# pylint: disable=missing-docstring
"""
Ansible module for determining information about the docker host.

While there are several ansible modules that make use of the docker
api to expose container and image facts in a remote host, they
are unable to return specific information about the host machine
itself. This module exposes the same information obtained through
executing the `docker info` command on a docker host, in json format.
"""

from ansible.module_utils.docker_common import AnsibleDockerClient


def main():
    client = AnsibleDockerClient()

    client.module.exit_json(
        info=client.info(),
    )


if __name__ == '__main__':
    main()