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:
Jan 2020-06-20 21:44:09 +02:00
parent e2b9ae548c
commit 33d86b9ebb
15 changed files with 26 additions and 21 deletions

View File

@ -0,0 +1,4 @@
---
- name: 'Reload systemd'
systemd: daemon_reload=yes

View File

@ -1,7 +1,4 @@
---
- name: Reload systemd
command: systemctl daemon-reload
- name: Restart fastd-exporter
service: name=fastd-exporter state=restarted

View File

@ -0,0 +1,4 @@
---
dependencies:
- { role: common-handlers }

View File

@ -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

View File

@ -0,0 +1,4 @@
---
dependencies:
- { role: common-handlers }

View File

@ -2,6 +2,3 @@
- name: Reload interfaces
command: /sbin/ifreload -a
- name: Reload systemd
command: systemctl daemon-reload

View File

@ -0,0 +1,4 @@
---
dependencies:
- { role: common-handlers }

View File

@ -1,7 +1,4 @@
---
- name: Reload systemd
command: systemctl daemon-reload
- name: Restart node_exporter
service: name=node_exporter state=restarted

View File

@ -0,0 +1,4 @@
---
dependencies:
- { role: common-handlers }

View File

@ -1,8 +1,5 @@
---
- name: Reload systemd
command: systemctl daemon-reload
- name: Restart prometheus
service: name=prometheus state=restarted

View File

@ -0,0 +1,4 @@
---
dependencies:
- { role: common-handlers }

View File

@ -1,7 +1,4 @@
---
- name: Reload systemd
command: systemctl daemon-reload
- name: Restart respondd
service: name=respondd state=restarted

View File

@ -1,4 +1,5 @@
---
dependencies:
- { role: common-handlers }
- { role: git }

View File

@ -1,8 +1,5 @@
---
- name: Reload systemd
command: systemctl daemon-reload
- name: Restart yanic
service: name=yanic state=restarted

View File

@ -1,4 +1,5 @@
---
dependencies:
- { role: common-handlers }
- { role: go }