ansible/roles/prometheus_node/tasks/main.yml

21 lines
445 B
YAML
Raw Normal View History

2019-05-05 14:07:04 +02:00
---
2023-04-01 22:32:42 +02:00
- name: Install prometheus-node-exporter
2019-05-05 14:07:04 +02:00
apt:
2023-04-01 22:32:42 +02:00
name:
- prometheus-node-exporter
- prometheus-node-exporter-collectors
2019-11-01 14:16:32 +01:00
install_recommends: false # Do not install smartmontools
2023-04-01 22:32:42 +02:00
- name: Install smartmontools
2019-11-01 14:16:32 +01:00
apt:
2023-04-01 22:32:42 +02:00
name: smartmontools
2019-11-01 14:16:32 +01:00
when:
2023-04-01 22:32:42 +02:00
- "ansible_virtualization_role == 'host'"
2023-04-01 22:32:42 +02:00
- name: Enable prometheus-node-exporter
2019-07-22 20:56:43 +02:00
systemd:
name: prometheus-node-exporter
2019-07-22 21:04:58 +02:00
enabled: true
2019-07-22 20:56:43 +02:00
state: started
2023-04-01 22:32:42 +02:00
...