node-exporter/tasks/Debian.yaml
2023-08-10 17:12:28 +03:00

21 lines
463 B
YAML

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