1
0
Fork 0
mirror of https://gitlab.com/s3lph/ansible-collection-prometheus synced 2024-10-23 11:56:59 +02:00
ansible-collection-prometheus/roles/prometheus_node/tasks/install/Debian.yml

35 lines
993 B
YAML

---
- name: install prometheus-node-exporter
ansible.builtin.apt:
name: "{{ item }}"
state: present
update_cache: yes
loop:
- prometheus-node-exporter
- prometheus-node-exporter-collectors
- name: start prometheus-node-exporter.service
ansible.builtin.systemd:
name: prometheus-node-exporter.service
state: started
enabled: yes
- name: start prometheus-node-exporter-apt.timer
ansible.builtin.systemd:
name: prometheus-node-exporter-apt.timer
state: started
enabled: yes
- name: install smartmontools
ansible.builtin.apt:
name: smartmontools
state: present
when:
- ansible_virtualization_role == 'host'
- name: start prometheus-node-exporter-smartmon.timer
ansible.builtin.systemd:
name: prometheus-node-exporter-smartmon.timer
state: "{{ (ansible_virtualization_role == 'host' and not smartmon_exporter_force_off) | ternary('started', 'stopped') }}"
enabled: "{{ ansible_virtualization_role == 'host' }}"