{# For fancy icons and a pleasing font #} {# 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', 'router', 'registry'] -%} {# 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/Alt Name(s) Serial Health Days Remaining Expiration Date Path
{{ v.cert_cn }} int({{ v.serial }})/hex({{ v.serial_hex }}) {{ v.health }} {{ v.days_remaining }} {{ v.expiry }} {{ v.path }}

{% endfor %} {# end section generation for each host #}