summaryrefslogtreecommitdiffstats
path: root/playbooks/byo/openshift-checks/README.md
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-08-28 13:13:05 -0400
committerGitHub <noreply@github.com>2017-08-28 13:13:05 -0400
commitca5ebcbb4ee01841ca415df3c5afc61c192e2df2 (patch)
tree70c6f0eb0825b79bb50be62683260fcf10b0c285 /playbooks/byo/openshift-checks/README.md
parent60b91e4ea7289e49dbd3b3a5539fb54de0e66c7e (diff)
parent51645eab599b0b23c582e22a9e84ce9423362ab1 (diff)
downloadopenshift-ca5ebcbb4ee01841ca415df3c5afc61c192e2df2.tar.gz
openshift-ca5ebcbb4ee01841ca415df3c5afc61c192e2df2.tar.bz2
openshift-ca5ebcbb4ee01841ca415df3c5afc61c192e2df2.tar.xz
openshift-ca5ebcbb4ee01841ca415df3c5afc61c192e2df2.zip
Merge pull request #4570 from rhcarvalho/adhoc-check-runner-misc
Add playbook to run adhoc health checks or list existing checks
Diffstat (limited to 'playbooks/byo/openshift-checks/README.md')
-rw-r--r--playbooks/byo/openshift-checks/README.md48
1 files changed, 43 insertions, 5 deletions
diff --git a/playbooks/byo/openshift-checks/README.md b/playbooks/byo/openshift-checks/README.md
index f0f14b268..b26e7d7ed 100644
--- a/playbooks/byo/openshift-checks/README.md
+++ b/playbooks/byo/openshift-checks/README.md
@@ -7,15 +7,14 @@ Ansible's default operation mode is to fail fast, on the first error. However,
when performing checks, it is useful to gather as much information about
problems as possible in a single run.
-Thus, the playbooks run a battery of checks against the inventory hosts and have
-Ansible gather intermediate errors, giving a more complete diagnostic of the
-state of each host. If any check failed, the playbook run will be marked as
-failed.
+Thus, the playbooks run a battery of checks against the inventory hosts and
+gather intermediate errors, giving a more complete diagnostic of the state of
+each host. If any check failed, the playbook run will be marked as failed.
To facilitate understanding the problems that were encountered, a custom
callback plugin summarizes execution errors at the end of a playbook run.
-# Available playbooks
+## Available playbooks
1. Pre-install playbook ([pre-install.yml](pre-install.yml)) - verifies system
requirements and look for common problems that can prevent a successful
@@ -27,6 +26,10 @@ callback plugin summarizes execution errors at the end of a playbook run.
3. Certificate expiry playbooks ([certificate_expiry](certificate_expiry)) -
check that certificates in use are valid and not expiring soon.
+4. Adhoc playbook ([adhoc.yml](adhoc.yml)) - use it to run adhoc checks or to
+ list existing checks.
+ See the [next section](#the-adhoc-playbook) for a usage example.
+
## Running
With a [recent installation of Ansible](../../../README.md#setup), run the playbook
@@ -59,6 +62,41 @@ against your inventory file. Here is the step-by-step:
$ ansible-playbook -i <inventory file> playbooks/byo/openshift-checks/certificate_expiry/default.yaml -v
```
+### The adhoc playbook
+
+The adhoc playbook gives flexibility to run any check or a custom group of
+checks. What will be run is determined by the `openshift_checks` variable,
+which, among other ways supported by Ansible, can be set on the command line
+using the `-e` flag.
+
+For example, to run the `docker_storage` check:
+
+```console
+$ ansible-playbook -i <inventory file> playbooks/byo/openshift-checks/adhoc.yml -e openshift_checks=docker_storage
+```
+
+To run more checks, use a comma-separated list of check names:
+
+```console
+$ ansible-playbook -i <inventory file> playbooks/byo/openshift-checks/adhoc.yml -e openshift_checks=docker_storage,disk_availability
+```
+
+To run an entire class of checks, use the name of a check group tag, prefixed by `@`. This will run all checks tagged `preflight`:
+
+```console
+$ ansible-playbook -i <inventory file> playbooks/byo/openshift-checks/adhoc.yml -e openshift_checks=@preflight
+```
+
+It is valid to specify multiple check tags and individual check names together
+in a comma-separated list.
+
+To list all of the available checks and tags, run the adhoc playbook without
+setting the `openshift_checks` variable:
+
+```console
+$ ansible-playbook -i <inventory file> playbooks/byo/openshift-checks/adhoc.yml
+```
+
## Running in a container
This repository is built into a Docker image including Ansible so that it can