Browse Source

network interace states should be unique, refs #8

master
Arnold Bechtoldt 9 years ago
parent
commit
95de708c75
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      network/interfaces.sls

+ 8
- 2
network/interfaces.sls View File

@@ -16,8 +16,14 @@
{% set interfaces = interfaces + salt['pillar.get']('network:interfaces') %}
{% endif %}

{% for n in interfaces %}
network_{{ n.name }}:
{% for n in interfaces -%}
{%- if 'ipaddr' in n -%}
{%- set state_id = 'network_' ~ n.name ~ '_' ~ n.ipaddr -%}
{%- else %}
{%- set state_id = 'network_' ~ n.name -%}
{%- endif %}

{{ state_id }}:
network:
- managed
- name: {{ n.name }}

Loading…
Cancel
Save