Browse Source

Merge pull request #29 from obourdon/stacklight

Fixes for idempotence
tags/2016.12
Filip Pytloun 8 years ago
parent
commit
89654cc433
2 changed files with 4 additions and 1 deletions
  1. +3
    -1
      linux/network/host.sls
  2. +1
    -0
      linux/network/interface.sls

+ 3
- 1
linux/network/host.sls View File

@@ -28,6 +28,8 @@ linux_host_{{ name }}_order_fix:
- repl: {{ after }}
- watch:
- host: linux_host_{{ name }}
- onlyif:
- grep -q "{{ before }}" /etc/hosts

{%- endif %}

@@ -35,4 +37,4 @@ linux_host_{{ name }}_order_fix:

{%- endfor %}

{%- endif %}
{%- endif %}

+ 1
- 0
linux/network/interface.sls View File

@@ -88,6 +88,7 @@ linux_interface_{{ interface_name }}:
- type: {{ interface.type }}
{%- if interface.address is defined %}
{%- if grains.os_family == 'Debian' %}
- unless: grep -q "iface {{ interface_name }} " /etc/network/interfaces
- proto: {{ interface.get('proto', 'static') }}
{% endif %}
{%- if grains.os_family == 'RedHat' %}

Loading…
Cancel
Save