|
|
|
|
|
|
|
|
{% set interfaces = interfaces + salt['pillar.get']('network:interfaces') %} |
|
|
{% set interfaces = interfaces + salt['pillar.get']('network:interfaces') %} |
|
|
{% endif %} |
|
|
{% endif %} |
|
|
|
|
|
|
|
|
|
|
|
{# http://stackoverflow.com/questions/4870346/can-a-jinja-variables-scope-extend-beyond-in-an-inner-block #} |
|
|
|
|
|
{%- set vlanRequired = [] -%} |
|
|
|
|
|
|
|
|
{% for n in interfaces %} |
|
|
{% for n in interfaces %} |
|
|
network-{{ n.name }}: |
|
|
network-{{ n.name }}: |
|
|
network: |
|
|
network: |
|
|
|
|
|
|
|
|
- network: network-{{ u }} |
|
|
- network: network-{{ u }} |
|
|
{% endfor %} |
|
|
{% endfor %} |
|
|
{% endif %} |
|
|
{% endif %} |
|
|
|
|
|
{% if n.type == 'vlan' %} |
|
|
|
|
|
{% do vlanRequired.append(1) -%} |
|
|
|
|
|
- require: |
|
|
|
|
|
- pkg: vlan |
|
|
|
|
|
{% endif %} |
|
|
{% endfor %} |
|
|
{% endfor %} |
|
|
|
|
|
|
|
|
|
|
|
{% if vlanRequired %} |
|
|
|
|
|
vlan: |
|
|
|
|
|
pkg.installed |
|
|
|
|
|
{% endif %} |