automatic service restarting
This commit is contained in:
parent
24ed406026
commit
64635320a5
|
@ -1,5 +1,7 @@
|
|||
isc-dhcp-server:
|
||||
pkg.installed: []
|
||||
service:
|
||||
- running
|
||||
|
||||
/etc/dhcp/dhcpd.conf:
|
||||
file.managed:
|
||||
|
@ -20,8 +22,10 @@ autostart-dhcpd:
|
|||
|
||||
start-dhcpd:
|
||||
service.running:
|
||||
- name: isc-dhcp-server
|
||||
require_in:
|
||||
- file: /etc/dhcp/dhcpd.conf
|
||||
- file: /etc/default/isc-dhcp-server
|
||||
|
||||
- name: isc-dhcp-server
|
||||
require_in:
|
||||
- file: /etc/dhcp/dhcpd.conf
|
||||
- file: /etc/default/isc-dhcp-server
|
||||
watch:
|
||||
- pkg: isc-dhcp-server
|
||||
- file: /etc/dhcp/dhcpd.conf
|
||||
|
|
|
@ -24,6 +24,8 @@ start-{{ daemon }}:
|
|||
- name: {{ daemon }}
|
||||
require:
|
||||
- service: autostart-{{ daemon }}
|
||||
watch:
|
||||
- file: /etc/quagga/{{ daemon }}.conf
|
||||
|
||||
{%- endfor %}
|
||||
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
unbound:
|
||||
pkg.installed: []
|
||||
service:
|
||||
- running
|
||||
- watch:
|
||||
- pkg: unbound
|
||||
- file: /etc/unbound/unbound.conf.d/listen.conf
|
||||
|
||||
/etc/unbound/unbound.conf.d/listen.conf:
|
||||
file.managed:
|
||||
|
|
|
@ -65,8 +65,10 @@ start-{{ name }}:
|
|||
require_in:
|
||||
- file: /etc/openvpn/{{ name }}.conf
|
||||
- file: /etc/openvpn/{{ name }}.auth
|
||||
watch:
|
||||
- file: /etc/openvpn/{{ name }}.conf
|
||||
- file: /etc/openvpn/{{ name }}.auth
|
||||
require:
|
||||
- file: /dev/net/tun
|
||||
|
||||
{%- endfor %}
|
||||
|
||||
|
|
Loading…
Reference in New Issue