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