Commit 57f98f36 by Czémán Arnold

network: add dhcp restart

parent 9c4024a5
...@@ -45,6 +45,17 @@ fix_dhcp: ...@@ -45,6 +45,17 @@ fix_dhcp:
{% endif %} {% endif %}
isc-dhcp-server: isc-dhcp-server:
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
cmd.run:
- name: /bin/systemctl restart isc-dhcp-server
{% if grains['os_family'] == 'RedHat' %}
- watch:
- script: fix_dhcp
{% elif grains['os'] == 'Debian' %}
- watch:
- cmd: fix_dhcp_daemon_reload
{% endif %}
{% endif %}
service: service:
- running - running
{% if grains['os_family'] == 'RedHat' %} {% if grains['os_family'] == 'RedHat' %}
...@@ -55,9 +66,13 @@ isc-dhcp-server: ...@@ -55,9 +66,13 @@ isc-dhcp-server:
{% if grains['os_family'] == 'RedHat' %} {% if grains['os_family'] == 'RedHat' %}
- watch: - watch:
- script: fix_dhcp - script: fix_dhcp
- require:
- cmd: isc-dhcp-server
{% elif grains['os'] == 'Debian' %} {% elif grains['os'] == 'Debian' %}
- watch: - watch:
- cmd: fix_dhcp_daemon_reload - cmd: fix_dhcp_daemon_reload
- require:
- cmd: isc-dhcp-server
{% endif %} {% endif %}
{% if grains['os'] == 'Debian' %} {% if grains['os'] == 'Debian' %}
......
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