Browse Source

Host order fix finalisation

tags/2016.12
Ales Komarek 8 years ago
parent
commit
878ea32824
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      linux/network/host.sls

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



{%- if host.address in grains.ipv4 %} {%- if host.address in grains.ipv4 %}


{%- if host.names.0|length > host.names.1|length %}
{%- if host.names.1 in host.names.0 %}
{%- set before = host.names.1 + " " + host.names.0 %} {%- set before = host.names.1 + " " + host.names.0 %}
{%- set after = host.names.0 + " " + host.names.1 %} {%- set after = host.names.0 + " " + host.names.1 %}
{%- else %}
{%- elif host.names.0 in host.names.1 %}
{%- set before = host.names.0 + " " + host.names.1 %} {%- set before = host.names.0 + " " + host.names.1 %}
{%- set after = host.names.1 + " " + host.names.0 %} {%- set after = host.names.1 + " " + host.names.0 %}
{%- endif %} {%- endif %}


mine.send:
{%- if before is defined and after is defined %}

linux_host_{{ name }}_order_fix:
module.run: module.run:
- name: file.replace - name: file.replace
- path: /etc/hosts - path: /etc/hosts


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


{%- endif %}

{%- endfor %} {%- endfor %}


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

Loading…
Cancel
Save