-
Notifications
You must be signed in to change notification settings - Fork 74
/
report-ios.j2
31 lines (30 loc) · 984 Bytes
/
report-ios.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
30
31
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<table>
<thead>
<tr>
<th>Hostname</th>
<th>Model Type</th>
<th>Serial Number</th>
<th>Mgmt interface IP</th>
<th>Code Version</th>
</tr>
</thead>
<tbody>
{% for network_switch in groups['ios'] %}
<tr>
<td>{{hostvars[network_switch]['ansible_net_hostname']}}</td>
<td>{{hostvars[network_switch]['ansible_net_model']}}</td>
<td>{{hostvars[network_switch]['ansible_net_serialnum']}}</td>
<td>{{hostvars[network_switch]['ansible_net_interfaces']['GigabitEthernet0/0']['ipv4'][0]['address']}}</td>
<td {% if hostvars[network_switch]['ansible_net_version'] != desired_ios_version %}style="background:yellow;"{% endif %}>{{hostvars[network_switch]['ansible_net_version']}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</body>
</html>