Browse Source

fixing a wrong usage of var tests

tags/v0.1
Arnold Bechtoldt 10 years ago
parent
commit
76e8f88067
2 changed files with 7 additions and 7 deletions
  1. +1
    -1
      network/interfaces.sls
  2. +6
    -6
      network/resolver.sls

+ 1
- 1
network/interfaces.sls View File



{% set interfaces = datamap['default_interfaces'] %} {% set interfaces = datamap['default_interfaces'] %}


{% if salt['pillar.get']('network:interfaces') is defined %}
{% if salt['pillar.get']('network:interfaces', False) %}
{% set interfaces = interfaces + salt['pillar.get']('network:interfaces') %} {% set interfaces = interfaces + salt['pillar.get']('network:interfaces') %}
{% endif %} {% endif %}



+ 6
- 6
network/resolver.sls View File

- user: root - user: root
- group: root - group: root
- contents: | - contents: |
{%- if salt['pillar.get']('network:resolver:file_prepend') is defined %}
{%- if salt['pillar.get']('network:resolver:file_prepend', False) %}
{{ salt['pillar.get']('network:resolver:file_prepend') }} {{ salt['pillar.get']('network:resolver:file_prepend') }}
{%- endif -%} {%- endif -%}
{% if salt['pillar.get']('network:resolver:domain') is defined %}
{% if salt['pillar.get']('network:resolver:domain', False) %}
domain: {{ salt['pillar.get']('network:resolver:domain') }} domain: {{ salt['pillar.get']('network:resolver:domain') }}
{%- endif -%} {%- endif -%}
{%- if salt['pillar.get']('network:resolver:search') is defined %}
{%- if salt['pillar.get']('network:resolver:search', False) %}
search: {{ salt['pillar.get']('network:resolver:search') }} search: {{ salt['pillar.get']('network:resolver:search') }}
{%- endif -%} {%- endif -%}
{%- if salt['pillar.get']('network:resolver:nameservers') is defined -%}
{%- if salt['pillar.get']('network:resolver:nameservers', False) -%}
{%- for n in salt['pillar.get']('network:resolver:nameservers') %} {%- for n in salt['pillar.get']('network:resolver:nameservers') %}
nameserver: {{ n }} nameserver: {{ n }}
{%- endfor -%} {%- endfor -%}
{%- endif -%} {%- endif -%}
{%- if salt['pillar.get']('network:resolver:options') is defined %}
{%- if salt['pillar.get']('network:resolver:options', False) %}
options: {{ salt['pillar.get']('network:resolver:options')|join(' ') }} options: {{ salt['pillar.get']('network:resolver:options')|join(' ') }}
{%- endif -%} {%- endif -%}
{%- if salt['pillar.get']('network:resolver:file_append') is defined %}
{%- if salt['pillar.get']('network:resolver:file_append', False) %}
{{ salt['pillar.get']('network:resolver:file_append') }} {{ salt['pillar.get']('network:resolver:file_append') }}
{%- endif %} {%- endif %}

Loading…
Cancel
Save