瀏覽代碼

network interace states should be unique, refs #8

master
Arnold Bechtoldt 9 年之前
父節點
當前提交
95de708c75
共有 1 個檔案被更改,包括 8 行新增2 行删除
  1. +8
    -2
      network/interfaces.sls

+ 8
- 2
network/interfaces.sls 查看文件

{% set interfaces = interfaces + salt['pillar.get']('network:interfaces') %} {% set interfaces = interfaces + salt['pillar.get']('network:interfaces') %}
{% endif %} {% 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: network:
- managed - managed
- name: {{ n.name }} - name: {{ n.name }}

Loading…
取消
儲存