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