{% if hosts is defined %} {% for host in hosts %} {{host.ip}} {{host.name}} {% endfor %} {% endif %}