From 4273b21105dd11f52de354b4777d33e4296ba7e0 Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Thu, 6 Oct 2016 10:01:48 -0700 Subject: Get router/registry certs. Collect common names and subjectAltNames --- .../templates/cert-expiry-table.html.j2 | 66 +++++++++++++--------- 1 file changed, 40 insertions(+), 26 deletions(-) (limited to 'playbooks') diff --git a/playbooks/common/openshift-cluster/templates/cert-expiry-table.html.j2 b/playbooks/common/openshift-cluster/templates/cert-expiry-table.html.j2 index da7844c37..f74d7f1ce 100644 --- a/playbooks/common/openshift-cluster/templates/cert-expiry-table.html.j2 +++ b/playbooks/common/openshift-cluster/templates/cert-expiry-table.html.j2 @@ -3,7 +3,7 @@ OCP Certificate Expiry Report - {# For fancy icons #} + {# For fancy icons and a pleasing font #} -

OCP Certificate Expiry Report

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

{{ host }}

- {{ hostvars[host].check_results.msg }} + {{ 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'] -%} + {%- for kind in ['ocp_certs', 'etcd', 'kubeconfigs', 'router', 'registry'] -%} - - + + - {# A row for each certificate examined #} + {# 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 %} + {# 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 #} + {# end row generation per cert of this type #} {% endfor %} - {# end generation for each kind of cert block #} + {# end generation for each kind of cert block #}

{{ kind }}

 Certificate Common Name Certificate Common/Alt Name(s) Health Days Remaining Expiration Date Path
{{ v.cert_cn }}
{{ v.cert_cn }} {{ v.health }} {{ v.days_remaining }} {{ v.expiry }} {{ v.path }}

{% endfor %} @@ -100,10 +114,10 @@ -- cgit v1.2.3