Commit 57f98f36 by Czémán Arnold

network: add dhcp restart

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