From d7bf06b2c474120cb2e183d2c889662c1270bf04 Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Fri, 13 Jan 2017 10:38:41 -0800 Subject: [Cert Expiry] Add serial numbers, include example PBs, docs * Now includes cert serial numbers in JSON and HTML output * Docs are updated with explicit usage instructions * Each example playbook includes a link to the playbook and an example of how to run it * A graphic and copy of an HTML report are now included * Example JSON output has been updated --- .../examples/playbooks/default.yaml | 10 ++++++++++ .../examples/playbooks/easy-mode.yaml | 21 +++++++++++++++++++++ .../playbooks/html_and_json_default_paths.yaml | 12 ++++++++++++ .../longer-warning-period-json-results.yaml | 13 +++++++++++++ .../examples/playbooks/longer_warning_period.yaml | 12 ++++++++++++ 5 files changed, 68 insertions(+) create mode 100644 roles/openshift_certificate_expiry/examples/playbooks/default.yaml create mode 100644 roles/openshift_certificate_expiry/examples/playbooks/easy-mode.yaml create mode 100644 roles/openshift_certificate_expiry/examples/playbooks/html_and_json_default_paths.yaml create mode 100644 roles/openshift_certificate_expiry/examples/playbooks/longer-warning-period-json-results.yaml create mode 100644 roles/openshift_certificate_expiry/examples/playbooks/longer_warning_period.yaml (limited to 'roles/openshift_certificate_expiry/examples/playbooks') diff --git a/roles/openshift_certificate_expiry/examples/playbooks/default.yaml b/roles/openshift_certificate_expiry/examples/playbooks/default.yaml new file mode 100644 index 000000000..630135cae --- /dev/null +++ b/roles/openshift_certificate_expiry/examples/playbooks/default.yaml @@ -0,0 +1,10 @@ +--- +# Default behavior, you will need to ensure you run ansible with the +# -v option to see report results: + +- name: Check cert expirys + hosts: nodes:masters:etcd + become: yes + gather_facts: no + roles: + - role: openshift_certificate_expiry diff --git a/roles/openshift_certificate_expiry/examples/playbooks/easy-mode.yaml b/roles/openshift_certificate_expiry/examples/playbooks/easy-mode.yaml new file mode 100644 index 000000000..f322e7a51 --- /dev/null +++ b/roles/openshift_certificate_expiry/examples/playbooks/easy-mode.yaml @@ -0,0 +1,21 @@ +--- +# This example playbook is great if you're just wanting to try the +# role out. +# +# This example enables HTML and JSON reports +# +# The warning window is set very large so you will almost always get results back +# +# All certificates (healthy or not) are included in the results + +- name: Check cert expirys + hosts: nodes:masters:etcd + become: yes + gather_facts: no + vars: + openshift_certificate_expiry_warning_days: 1500 + openshift_certificate_expiry_save_json_results: yes + openshift_certificate_expiry_generate_html_report: yes + openshift_certificate_expiry_show_all: yes + roles: + - role: openshift_certificate_expiry diff --git a/roles/openshift_certificate_expiry/examples/playbooks/html_and_json_default_paths.yaml b/roles/openshift_certificate_expiry/examples/playbooks/html_and_json_default_paths.yaml new file mode 100644 index 000000000..d80cb6ff4 --- /dev/null +++ b/roles/openshift_certificate_expiry/examples/playbooks/html_and_json_default_paths.yaml @@ -0,0 +1,12 @@ +--- +# Generate HTML and JSON artifacts in their default paths: + +- name: Check cert expirys + hosts: nodes:masters:etcd + become: yes + gather_facts: no + vars: + openshift_certificate_expiry_generate_html_report: yes + openshift_certificate_expiry_save_json_results: yes + roles: + - role: openshift_certificate_expiry diff --git a/roles/openshift_certificate_expiry/examples/playbooks/longer-warning-period-json-results.yaml b/roles/openshift_certificate_expiry/examples/playbooks/longer-warning-period-json-results.yaml new file mode 100644 index 000000000..87a0f3be4 --- /dev/null +++ b/roles/openshift_certificate_expiry/examples/playbooks/longer-warning-period-json-results.yaml @@ -0,0 +1,13 @@ +--- +# Change the expiration warning window to 1500 days (good for testing +# the module out) and save the results as a JSON file: + +- name: Check cert expirys + hosts: nodes:masters:etcd + become: yes + gather_facts: no + vars: + openshift_certificate_expiry_warning_days: 1500 + openshift_certificate_expiry_save_json_results: yes + roles: + - role: openshift_certificate_expiry diff --git a/roles/openshift_certificate_expiry/examples/playbooks/longer_warning_period.yaml b/roles/openshift_certificate_expiry/examples/playbooks/longer_warning_period.yaml new file mode 100644 index 000000000..960457c4b --- /dev/null +++ b/roles/openshift_certificate_expiry/examples/playbooks/longer_warning_period.yaml @@ -0,0 +1,12 @@ +--- +# Change the expiration warning window to 1500 days (good for testing +# the module out): + +- name: Check cert expirys + hosts: nodes:masters:etcd + become: yes + gather_facts: no + vars: + openshift_certificate_expiry_warning_days: 1500 + roles: + - role: openshift_certificate_expiry -- cgit v1.2.3 From c8d7c7e2d512f94990ee461297876b10fbc73207 Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Wed, 18 Jan 2017 08:10:08 -0800 Subject: Fix yaml lint in easy-mode playbook --- roles/openshift_certificate_expiry/examples/playbooks/easy-mode.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'roles/openshift_certificate_expiry/examples/playbooks') diff --git a/roles/openshift_certificate_expiry/examples/playbooks/easy-mode.yaml b/roles/openshift_certificate_expiry/examples/playbooks/easy-mode.yaml index f322e7a51..d0209426f 100644 --- a/roles/openshift_certificate_expiry/examples/playbooks/easy-mode.yaml +++ b/roles/openshift_certificate_expiry/examples/playbooks/easy-mode.yaml @@ -17,5 +17,5 @@ openshift_certificate_expiry_save_json_results: yes openshift_certificate_expiry_generate_html_report: yes openshift_certificate_expiry_show_all: yes - roles: + roles: - role: openshift_certificate_expiry -- cgit v1.2.3