aboutsummaryrefslogblamecommitdiffstats
path: root/templates/macros.j2
blob: e2aad963317668887cd5703423e9c3b515fe5752 (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.in is defined and h.ip.out is defined -%}
{{ caller(h) }}
{%- endif %}
{%- endfor %}
{%- endmacro %}
remember that computers suck.