Import SRE inventory code

This commit is contained in:
Daniel Parks 2017-09-11 18:02:43 -07:00
commit 7364ccbff8
No known key found for this signature in database
GPG key ID: 7335138B2B9829EB
18 changed files with 5348 additions and 0 deletions

29
templates/services.html Normal file
View file

@ -0,0 +1,29 @@
{% extends "layout.html" %}
{% block title %}Service inventory{% endblock %}
{% block body %}
<h1>Service inventory</h1>
<table>
<thead>
<tr>
<th>Service</th>
<th>Nodes</th>
</tr>
</thead>
<tbody>
{% for service in services %}
<tr id="{{ service }}">
<th>
<a href="./{{ service["class_name"] }}.html">{{ service["human_name"] }}</a>
</th>
<td>
<ul>
{% for node in service["nodes"] | sort(attribute="facts.fqdn") %}
<li><a href="../nodes/{{ node["certname"] }}.html">{{ node["facts"]["fqdn"] }}</a></li>
{% endfor %}
</ul>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}