1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
- name: "[Alpine/OpenRC] Restart service: networking"
service:
name: networking
state: restarted
when:
- ansible_service_mgr == "openrc"
listen: "Restart networking"
- name: "[OpenRC] Restart service: chronyd (to deploy config changes)"
service:
name: chronyd
state: restarted
when:
- ansible_service_mgr == "openrc"
listen: "Restart chrony"
- name: "[OpenRC] Restart service: node-exporter (to deploy config changes)"
service:
name: node-exporter
state: restarted
when:
- ansible_service_mgr == "openrc"
listen: "Restart prometheus-node-exporter"
- name: "[systemd] Restart service: prometheus-node-exporter (to deploy config changes)"
systemd:
name: prometheus-node-exporter
state: restarted
when:
- ansible_service_mgr == "systemd"
listen: "Restart prometheus-node-exporter"