- #!jinja|yaml
-
- {% from "network/defaults.yaml" import rawmap with context %}
- {% set datamap = salt['grains.filter_by'](rawmap, merge=salt['pillar.get']('network')) %}
-
-
-
- {% for k, v in datamap.routes|default({})|dictsort %}
- routes_{{ v.name|default(k) }}:
- network.routes:
- - name: {{ v.name|default(k) }}
- - routes:
- {% for net in v.networks %}
- - name: {{ net.name }}
- ipaddr: {{ net.ipaddr }}
- netmask: {{ net.netmask }}
- gateway: {{ net.gateway }}
- {% endfor %}
- {% endfor %}
|