-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathreport.j2
29 lines (28 loc) · 855 Bytes
/
report.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<table>
<thead>
<tr>
<th>Hostname</th>
<th>Model Type</th>
<th>Mgmt0 IP Address</th>
<th>Code Version</th>
</tr>
</thead>
<tbody>
{% for network_switch in groups['cisco'] %}
<tr>
<td>{{hostvars[network_switch]['ansible_net_hostname']}}</td>
<td>{{hostvars[network_switch]['ansible_net_model']}}</td>
<td>{{hostvars[network_switch]['ansible_net_interfaces']['mgmt0']['ipv4']['address']}}</td>
<td {% if hostvars[network_switch]['ansible_net_version'] != desired_version %}style="background:yellow;"{% endif %}>{{hostvars[network_switch]['ansible_net_version']}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</body>
</html>