Add prometheus-node-exporter role and add it to most hosts
This commit is contained in:
parent
88b8d3b9ba
commit
261bd7d654
5 changed files with 47 additions and 2 deletions
9
playbooks/roles/prometheus_node_exporter/meta/main.yaml
Normal file
9
playbooks/roles/prometheus_node_exporter/meta/main.yaml
Normal file
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
dependencies:
|
||||
- role: distribution_check
|
||||
vars:
|
||||
distribution_check__distribution_support_spec:
|
||||
- name: Debian
|
||||
major_versions:
|
||||
- "11"
|
||||
- "12"
|
14
playbooks/roles/prometheus_node_exporter/tasks/main.yaml
Normal file
14
playbooks/roles/prometheus_node_exporter/tasks/main.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
- name: make sure the `prometheus-node-exporter` package is installed
|
||||
ansible.builtin.apt:
|
||||
name: prometheus-node-exporter
|
||||
state: present
|
||||
allow_change_held_packages: true
|
||||
update_cache: true
|
||||
become: true
|
||||
|
||||
- name: make sure `prometheus-node-exporter.service` is started and ansibled
|
||||
ansible.builtin.systemd:
|
||||
name: prometheus-node-exporter.service
|
||||
state: started
|
||||
enabled: true
|
||||
become: true
|
Loading…
Add table
Add a link
Reference in a new issue