diff options
author | juanvallejo <jvallejo@redhat.com> | 2017-02-22 19:13:20 -0500 |
---|---|---|
committer | juanvallejo <jvallejo@redhat.com> | 2017-03-23 12:01:01 -0400 |
commit | d6e3f266e30cd88b750b574e1b21e469b4cd3167 (patch) | |
tree | cb976b8d8b4e6b1d2ded6bf619102d04aebef5db /roles/openshift_health_checker/library/docker_info.py | |
parent | 27e47d32dc795dd27e901ca8618c90b7c1303547 (diff) | |
download | openshift-d6e3f266e30cd88b750b574e1b21e469b4cd3167.tar.gz openshift-d6e3f266e30cd88b750b574e1b21e469b4cd3167.tar.bz2 openshift-d6e3f266e30cd88b750b574e1b21e469b4cd3167.tar.xz openshift-d6e3f266e30cd88b750b574e1b21e469b4cd3167.zip |
add docker_image_availability check
This patch adds a check to ensure that required docker images are
available in at least one of the registries supplied in an installation
host. Images are available if they are either already present locally,
or able to be inspected using Skopeo on one of the configured
registries.
Diffstat (limited to 'roles/openshift_health_checker/library/docker_info.py')
-rw-r--r-- | roles/openshift_health_checker/library/docker_info.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/roles/openshift_health_checker/library/docker_info.py b/roles/openshift_health_checker/library/docker_info.py new file mode 100644 index 000000000..7f712bcff --- /dev/null +++ b/roles/openshift_health_checker/library/docker_info.py @@ -0,0 +1,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() |