|
@@ -1,12 +1,10 @@
|
|
HPC Cluster
|
|
HPC Cluster
|
|
-----------
|
|
-----------
|
|
Reachable Hosts:
|
|
Reachable Hosts:
|
|
-{% if reachable_host_number > 0 %}
|
|
|
|
|
|
+{% if reachable_host_number | int > 0 %}
|
|
{% for host in groups['reachable_ssh'] %}
|
|
{% for host in groups['reachable_ssh'] %}
|
|
-{% if reachable_host_number == 1 %}
|
|
|
|
- inet={{ host }}, link/ether={{ ethernet_detail_reachable.stdout | replace(';','')}}
|
|
|
|
-{% elif reachable_host_number > 1 %}
|
|
|
|
-{% if ethernet_detail_reachable.results[loop.index|int - 1].stdout | length > 1 %}
|
|
|
|
|
|
+{% if reachable_host_number | int >= 1 %}
|
|
|
|
+{% if ethernet_detail_reachable.results[loop.index|int - 1].stdout | length | int > 1 %}
|
|
inet={{ host }}, link/ether={{ ethernet_detail_reachable.results[loop.index|int - 1].stdout | replace(';','')}}
|
|
inet={{ host }}, link/ether={{ ethernet_detail_reachable.results[loop.index|int - 1].stdout | replace(';','')}}
|
|
{% else %}
|
|
{% else %}
|
|
inet={{ host }}, link/ether=Refer to mapping file provided
|
|
inet={{ host }}, link/ether=Refer to mapping file provided
|
|
@@ -17,22 +15,18 @@ Reachable Hosts:
|
|
Total reachable hosts: {{ reachable_host_number }}
|
|
Total reachable hosts: {{ reachable_host_number }}
|
|
|
|
|
|
Unreachable Hosts:
|
|
Unreachable Hosts:
|
|
-{% if unreachable_ping_host_number > 0 %}
|
|
|
|
|
|
+{% if unreachable_ping_host_number | int > 0 %}
|
|
{% for host in groups['ungrouped'] %}
|
|
{% for host in groups['ungrouped'] %}
|
|
-{% if unreachable_ping_host_number == 1 %}
|
|
|
|
- inet={{ host }}, link/ether={{ ethernet_detail_unreachable_ping.stdout | replace(';','')}}
|
|
|
|
-{% elif unreachable_ping_host_number > 1 %}
|
|
|
|
|
|
+{% if unreachable_ping_host_number | int >= 1 %}
|
|
inet={{ host }}, link/ether={{ ethernet_detail_unreachable_ping.results[loop.index|int - 1].stdout | replace(';','')}}
|
|
inet={{ host }}, link/ether={{ ethernet_detail_unreachable_ping.results[loop.index|int - 1].stdout | replace(';','')}}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endif %}
|
|
-{% if unreachable_ssh_host_number > 0 %}
|
|
|
|
|
|
+{% if unreachable_ssh_host_number | int > 0 %}
|
|
{% for host in groups['unreachable_ssh'] %}
|
|
{% for host in groups['unreachable_ssh'] %}
|
|
-{% if unreachable_ssh_host_number == 1 %}
|
|
|
|
- inet={{ host }}, link/ether={{ ethernet_detail_unreachable_ssh.stdout | replace(';','')}}
|
|
|
|
-{% elif unreachable_ssh_host_number > 1 %}
|
|
|
|
|
|
+{% if unreachable_ssh_host_number | int >= 1 %}
|
|
inet={{ host }}, link/ether={{ ethernet_detail_unreachable_ssh.results[loop.index|int - 1].stdout | replace(';','')}}
|
|
inet={{ host }}, link/ether={{ ethernet_detail_unreachable_ssh.results[loop.index|int - 1].stdout | replace(';','')}}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endif %}
|
|
-Total unreachable hosts: {{ unreachable_host_number }}
|
|
|
|
|
|
+Total unreachable hosts: {{ unreachable_host_number }}
|