Skip to content
Snippets Groups Projects
Commit 79a6f747 authored by nimrod's avatar nimrod
Browse files

- Validate config during role run (won't restart service with a faulty config).

parent 1bcb083a
No related branches found
No related tags found
No related merge requests found
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
owner: root owner: root
group: 0 group: 0
mode: 0o0644 mode: 0o0644
validate: '{{ dhcp_conf_validate[ansible_os_family]|default(omit) }}'
notify: notify:
- Restart ISC DHCP server - Restart ISC DHCP server
......
...@@ -16,3 +16,6 @@ dhcp_user: ...@@ -16,3 +16,6 @@ dhcp_user:
dhcp_conf_file: dhcp_conf_file:
OpenBSD: /etc/dhcpd.conf OpenBSD: /etc/dhcpd.conf
Debian: /etc/dhcp/dhcpd.conf Debian: /etc/dhcp/dhcpd.conf
dhcp_conf_validate:
Debian: dhcpd -t
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment