forked from FF-RGB/ansible
Add role common-handlers fixes linter E303
Commonly used handlers can be loaded by dependency. This also replaces systemctl daemon-reload invocation by its ansible module equivalent.
This commit is contained in:
parent
e2b9ae548c
commit
33d86b9ebb
4
roles/common-handlers/handlers/main.yml
Normal file
4
roles/common-handlers/handlers/main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
|
||||
- name: 'Reload systemd'
|
||||
systemd: daemon_reload=yes
|
@ -1,7 +1,4 @@
|
||||
---
|
||||
|
||||
- name: Reload systemd
|
||||
command: systemctl daemon-reload
|
||||
|
||||
- name: Restart fastd-exporter
|
||||
service: name=fastd-exporter state=restarted
|
||||
|
4
roles/fastd-exporter/meta/main.yml
Normal file
4
roles/fastd-exporter/meta/main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
|
||||
dependencies:
|
||||
- { role: common-handlers }
|
@ -3,6 +3,3 @@
|
||||
- name: Restart fastd
|
||||
service: name=fastd@{{ site_code }}{{ item }} state=restarted
|
||||
with_sequence: start=0 count={{ fastd_instances }}
|
||||
|
||||
- name: Reload systemd
|
||||
command: systemctl daemon-reload
|
||||
|
4
roles/fastd/meta/main.yml
Normal file
4
roles/fastd/meta/main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
|
||||
dependencies:
|
||||
- { role: common-handlers }
|
@ -2,6 +2,3 @@
|
||||
|
||||
- name: Reload interfaces
|
||||
command: /sbin/ifreload -a
|
||||
|
||||
- name: Reload systemd
|
||||
command: systemctl daemon-reload
|
||||
|
4
roles/mesh-interfaces/meta/main.yml
Normal file
4
roles/mesh-interfaces/meta/main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
|
||||
dependencies:
|
||||
- { role: common-handlers }
|
@ -1,7 +1,4 @@
|
||||
---
|
||||
|
||||
- name: Reload systemd
|
||||
command: systemctl daemon-reload
|
||||
|
||||
- name: Restart node_exporter
|
||||
service: name=node_exporter state=restarted
|
||||
|
4
roles/node_exporter/meta/main.yml
Normal file
4
roles/node_exporter/meta/main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
|
||||
dependencies:
|
||||
- { role: common-handlers }
|
@ -1,8 +1,5 @@
|
||||
---
|
||||
|
||||
- name: Reload systemd
|
||||
command: systemctl daemon-reload
|
||||
|
||||
- name: Restart prometheus
|
||||
service: name=prometheus state=restarted
|
||||
|
||||
|
4
roles/prometheus/meta/main.yml
Normal file
4
roles/prometheus/meta/main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
|
||||
dependencies:
|
||||
- { role: common-handlers }
|
@ -1,7 +1,4 @@
|
||||
---
|
||||
|
||||
- name: Reload systemd
|
||||
command: systemctl daemon-reload
|
||||
|
||||
- name: Restart respondd
|
||||
service: name=respondd state=restarted
|
||||
|
@ -1,4 +1,5 @@
|
||||
---
|
||||
|
||||
dependencies:
|
||||
- { role: common-handlers }
|
||||
- { role: git }
|
||||
|
@ -1,8 +1,5 @@
|
||||
---
|
||||
|
||||
- name: Reload systemd
|
||||
command: systemctl daemon-reload
|
||||
|
||||
- name: Restart yanic
|
||||
service: name=yanic state=restarted
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
---
|
||||
|
||||
dependencies:
|
||||
- { role: common-handlers }
|
||||
- { role: go }
|
||||
|
Loading…
Reference in New Issue
Block a user