Add new roles for monitoring
This commit is contained in:
35
ansible/playbooks/monitoring.yml
Normal file
35
ansible/playbooks/monitoring.yml
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
# Playbook to set up monitoring modules
|
||||
|
||||
- name: Install and configure the control node
|
||||
hosts: monitoring
|
||||
become: yes
|
||||
roles:
|
||||
- grafana
|
||||
|
||||
- name: Install and configure Prometheus node - Main node
|
||||
hosts: monitoring
|
||||
become: yes
|
||||
roles:
|
||||
- prometheus
|
||||
vars:
|
||||
blackbox: false
|
||||
scrape_files:
|
||||
- /etc/prometheus/scrape-main.yml
|
||||
|
||||
- name: Install and configure Prometheus node - Blackbox nodes
|
||||
hosts: blackbox
|
||||
become: yes
|
||||
roles:
|
||||
- prometheus
|
||||
- blackbox-exporter
|
||||
vars:
|
||||
blackbox: true
|
||||
scrape_files:
|
||||
- /etc/prometheus/scrape-blackbox.yml
|
||||
|
||||
- name: Install and configure nodes
|
||||
hosts: all
|
||||
become: yes
|
||||
roles:
|
||||
- node-exporter
|
Reference in New Issue
Block a user