{% macro render_host_facts(host) -%} {% if host.facts.values -%} {% set facts = host.facts.values|from_json -%} {% set items = ['ansible_fqdn', 'ansible_processor_cores', 'ansible_processor_vcpus', 'ansible_memtotal_mb', 'ansible_swaptotal_mb', 'ansible_distribution', 'ansible_distribution_version'] -%} {% set lists = ['ansible_all_ipv4_addresses', 'ansible_all_ipv6_addresses'] -%}
{% for value in items -%} {% if facts[value] -%}
{{ value }}
{{ facts[value] }}
{% endif %} {%- endfor %} {% for value in lists -%} {% if facts[value] -%}
{{ value }}
{% for item in facts[value] -%}
{{ item }}
{% endfor %} {% endif %} {%- endfor %}
{% else -%} No host facts recorded for this host. {% endif %} {% endmacro %}
{% if stat.host.facts -%}{{ stat.host.name }}{% else -%}{{ stat.host.name }}{% endif %}