node-exporter/tasks/Debian.yaml

21 lines
463 B
YAML
Raw Normal View History

2023-08-10 14:12:28 +00:00
---
- name: Add the user 'prometheus' for node_exporter
ansible.builtin.user:
name: prometheus
shell: /usr/sbin/nologin
append: yes
home: /var/lib/prometheus
- name: Ensure {{ node_exporter_package }} installed
apt:
name: "{{ node_exporter_package }}"
state: present
- name: Enable and start node_exporter
systemd:
name: "{{ node_exporter_unit_name }}"
state: started
enabled: yes
masked: no
daemon_reload: yes