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
|
- name: Restart fastd-exporter
|
||||||
service: name=fastd-exporter state=restarted
|
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
|
- name: Restart fastd
|
||||||
service: name=fastd@{{ site_code }}{{ item }} state=restarted
|
service: name=fastd@{{ site_code }}{{ item }} state=restarted
|
||||||
with_sequence: start=0 count={{ fastd_instances }}
|
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
|
- name: Reload interfaces
|
||||||
command: /sbin/ifreload -a
|
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
|
- name: Restart node_exporter
|
||||||
service: name=node_exporter state=restarted
|
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
|
- name: Restart prometheus
|
||||||
service: name=prometheus state=restarted
|
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
|
- name: Restart respondd
|
||||||
service: name=respondd state=restarted
|
service: name=respondd state=restarted
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
|
- { role: common-handlers }
|
||||||
- { role: git }
|
- { role: git }
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Reload systemd
|
|
||||||
command: systemctl daemon-reload
|
|
||||||
|
|
||||||
- name: Restart yanic
|
- name: Restart yanic
|
||||||
service: name=yanic state=restarted
|
service: name=yanic state=restarted
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
|
- { role: common-handlers }
|
||||||
- { role: go }
|
- { role: go }
|
||||||
|
Loading…
Reference in New Issue
Block a user