{% macro render_status(status) %} {% if status == 'success' %}
{% elif status == 'failed' %}
{% elif status == 'incomplete' %}
{% else %}
{% endif %} {% endmacro %} {% macro render_playbook_summary(playbook) %}
Ansible version
{{ playbook.ansible_version }}
Path
{{ playbook.path }}
{% endmacro %} {% 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 %} {% macro render_value_type(value, type) %} {% if type == 'json' or type == 'dict' %}
{{ value |to_nice_json |safe }}
{% elif type == 'list' %} {% elif type == 'url' %} {{ value }} {% else %}
{{ value }}
{% endif %} {% endmacro %} {% macro result_page_length(length) %} {% if length == 0 %} "paging": false, {% else %} "pageLength": {{ length }} {% endif %} {% endmacro %}