add handlers

This commit is contained in:
Ludovic Cartier
2021-05-26 12:01:00 +02:00
parent 30a119e241
commit 8aa8653e21
5 changed files with 103 additions and 73 deletions

36
handlers/main.yml Normal file
View File

@ -0,0 +1,36 @@
---
- name: 'prometheus | server | restart container'
systemd:
name: openvpn@{{ ansible_hostname }}.service
state: started
enabled: yes
tags: ['prometheus']
- name: 'prometheus | node exporter | restart service'
systemd:
name: prometheus-node-exporter.service
state: restarted
enabled: yes
tags: ['prometheus']
- name: 'prometheus | mysqld exporter | restart service'
systemd:
name: prometheus-mysqld-exporter.service
state: restarted
enabled: yes
tags: ['prometheus']
- name: 'prometheus | mongodb exporter | restart service'
systemd:
name: prometheus-mongodb-exporter.service
state: restarted
enabled: yes
tags: ['prometheus']
- name: 'prometheus | postgres exporter | restart service'
systemd:
name: prometheus-postgres-exporter.service
state: restarted
enabled: yes
tags: ['prometheus']