{% macro make_link(view, label) -%} {{label}} {%- endmacro %} {% macro statslink(stats, stat, playbook, host) %} {% if stats[stat] >= 1 -%} {{ make_link('playbook.playbook_results', stats[stat], playbook=playbook.id, host=host.name, status=stat) }} {% else -%} 0 {% endif %} {% endmacro %}