Commit 9c4024a5 by Czémán Arnold

network: modify state order with define requirements

parent 32bc05f9
...@@ -28,16 +28,20 @@ firewall2: ...@@ -28,16 +28,20 @@ firewall2:
- require: - require:
- network: vm - network: vm
salt://network/files/reload_firewall.sh: reload_firewall:
cmd.script: cmd.script:
- name: salt://network/files/reload_firewall.sh
- template: jinja - template: jinja
- user: {{ pillar['user'] }} - user: {{ pillar['user'] }}
- require: - require:
- service: firewall2 - service: firewall2
{% if grains['os_family'] == 'RedHat' %} {% if grains['os_family'] == 'RedHat' %}
salt://network/files/fix_dhcp.sh: fix_dhcp:
cmd.script cmd.script
- name: salt://network/files/fix_dhcp.sh
- require:
- script: reload_firewall
{% endif %} {% endif %}
isc-dhcp-server: isc-dhcp-server:
...@@ -48,6 +52,13 @@ isc-dhcp-server: ...@@ -48,6 +52,13 @@ isc-dhcp-server:
{% endif %} {% endif %}
- enable: True - enable: True
- reload: True - reload: True
{% if grains['os_family'] == 'RedHat' %}
- watch:
- script: fix_dhcp
{% elif grains['os'] == 'Debian' %}
- watch:
- cmd: fix_dhcp_daemon_reload
{% endif %}
{% if grains['os'] == 'Debian' %} {% if grains['os'] == 'Debian' %}
{# For next reboot #} {# For next reboot #}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment