From 5f7f6a6023c470337f0d879f55eb619fd63e2dbe Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Wed, 5 Oct 2016 15:38:43 -0700 Subject: Support etcd certs now. Fix lint. Generate HTML report. --- .../templates/cert-expiry-table.html.j2 | 110 +++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 playbooks/common/openshift-cluster/templates/cert-expiry-table.html.j2 (limited to 'playbooks/common/openshift-cluster/templates') diff --git a/playbooks/common/openshift-cluster/templates/cert-expiry-table.html.j2 b/playbooks/common/openshift-cluster/templates/cert-expiry-table.html.j2 new file mode 100644 index 000000000..da7844c37 --- /dev/null +++ b/playbooks/common/openshift-cluster/templates/cert-expiry-table.html.j2 @@ -0,0 +1,110 @@ + + + + + OCP Certificate Expiry Report + {# For fancy icons #} + + + + + +

OCP Certificate Expiry Report

+ +
+ + {# Each host has a header and table to itself #} + {% for host in play_hosts %} +

{{ host }}

+ +

+ {{ hostvars[host].check_results.msg }} +

+ + + + {# These are hard-coded right now, but should be grabbed dynamically from the registered results #} + {%- for kind in ['ocp_certs', 'etcd', 'kubeconfigs'] -%} + + + + + + + + + + + + + + {# A row for each certificate examined #} + {%- for v in hostvars[host].check_results.check_results[kind] -%} + + {# Let's add some flair and show status visually with fancy icons #} + {% if v.health == 'ok' %} + {% set health_icon = 'glyphicon glyphicon-ok' %} + {% elif v.health == 'warning' %} + {% set health_icon = 'glyphicon glyphicon-alert' %} + {% else %} + {% set health_icon = 'glyphicon glyphicon-remove' %} + {% endif %} + + + + + + + + + + {% endfor %} + {# end row generation per cert of this type #} + {% endfor %} + {# end generation for each kind of cert block #} +

{{ kind }}

 Certificate Common NameHealthDays RemainingExpiration DatePath
{{ v.cert_cn }}{{ v.health }}{{ v.days_remaining }}{{ v.expiry }}{{ v.path }}
+
+ {% endfor %} + {# end section generation for each host #} + + + + -- cgit v1.2.3