From 27e341dae69dc5b796616bee591e34a87d144e4b Mon Sep 17 00:00:00 2001
From: Tim Bielawa <tbielawa@redhat.com>
Date: Thu, 9 Feb 2017 09:47:30 -0800
Subject: Make the cert expiry playbooks runnable

---
 playbooks/certificate_expiry/default.yaml           | 10 ++++++++++
 playbooks/certificate_expiry/easy-mode.yaml         | 21 +++++++++++++++++++++
 .../html_and_json_default_paths.yaml                | 12 ++++++++++++
 .../longer-warning-period-json-results.yaml         | 13 +++++++++++++
 .../certificate_expiry/longer_warning_period.yaml   | 12 ++++++++++++
 playbooks/certificate_expiry/roles                  |  1 +
 6 files changed, 69 insertions(+)
 create mode 100644 playbooks/certificate_expiry/default.yaml
 create mode 100644 playbooks/certificate_expiry/easy-mode.yaml
 create mode 100644 playbooks/certificate_expiry/html_and_json_default_paths.yaml
 create mode 100644 playbooks/certificate_expiry/longer-warning-period-json-results.yaml
 create mode 100644 playbooks/certificate_expiry/longer_warning_period.yaml
 create mode 120000 playbooks/certificate_expiry/roles

(limited to 'playbooks')

diff --git a/playbooks/certificate_expiry/default.yaml b/playbooks/certificate_expiry/default.yaml
new file mode 100644
index 000000000..630135cae
--- /dev/null
+++ b/playbooks/certificate_expiry/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/playbooks/certificate_expiry/easy-mode.yaml b/playbooks/certificate_expiry/easy-mode.yaml
new file mode 100644
index 000000000..d0209426f
--- /dev/null
+++ b/playbooks/certificate_expiry/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/playbooks/certificate_expiry/html_and_json_default_paths.yaml b/playbooks/certificate_expiry/html_and_json_default_paths.yaml
new file mode 100644
index 000000000..d80cb6ff4
--- /dev/null
+++ b/playbooks/certificate_expiry/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/playbooks/certificate_expiry/longer-warning-period-json-results.yaml b/playbooks/certificate_expiry/longer-warning-period-json-results.yaml
new file mode 100644
index 000000000..87a0f3be4
--- /dev/null
+++ b/playbooks/certificate_expiry/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/playbooks/certificate_expiry/longer_warning_period.yaml b/playbooks/certificate_expiry/longer_warning_period.yaml
new file mode 100644
index 000000000..960457c4b
--- /dev/null
+++ b/playbooks/certificate_expiry/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
diff --git a/playbooks/certificate_expiry/roles b/playbooks/certificate_expiry/roles
new file mode 120000
index 000000000..b741aa3db
--- /dev/null
+++ b/playbooks/certificate_expiry/roles
@@ -0,0 +1 @@
+../../roles
\ No newline at end of file
-- 
cgit v1.2.3


From f9b74b54c833a6254342a84533a1086571872cb5 Mon Sep 17 00:00:00 2001
From: Tim Bielawa <tbielawa@redhat.com>
Date: Thu, 9 Feb 2017 11:21:18 -0800
Subject: Include rpm/git paths in expiry README.

---
 playbooks/certificate_expiry/easy-mode.yaml | 3 ---
 1 file changed, 3 deletions(-)

(limited to 'playbooks')

diff --git a/playbooks/certificate_expiry/easy-mode.yaml b/playbooks/certificate_expiry/easy-mode.yaml
index d0209426f..ae41c7c14 100644
--- a/playbooks/certificate_expiry/easy-mode.yaml
+++ b/playbooks/certificate_expiry/easy-mode.yaml
@@ -4,8 +4,6 @@
 #
 # 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
@@ -13,7 +11,6 @@
   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
-- 
cgit v1.2.3