aboutsummaryrefslogblamecommitdiffstats
path: root/templates/macros.j2
blob: d3f755ae96ad0f9bc3daf63f9ac86fade619f84c (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                                   
{% macro loop_hosts(group) -%}
{% for h in groups[group] -%}
{% set h = dict(hostvars[h]) %}
{{ caller(h) }}
{%- endfor %}
{%- endmacro %}

{% macro loop_valid_hosts(group) -%}
{% for h in groups[group] -%}
{% set h = dict(hostvars[h]) %}
{% if h.__ip.external is defined and h.__ip.internal is defined -%}
{{ caller(h) }}
{%- endif %}
{%- endfor %}
{%- endmacro %}
remember that computers suck.