mirror of
https://gitea.0xace.cc/ansible-galaxy/node-exporter.git
synced 2024-11-24 16:06:41 +00:00
21 lines
463 B
YAML
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
|