Files
ansible/roles/smartctl_exporter/tasks/main.yaml
T

22 lines
545 B
YAML

---
- name: Install smartctl_exporter (Debian)
ansible.builtin.apt:
name: prometheus-smartctl-exporter
state: present
when: ansible_facts["os_family"] == "Debian"
become: true
- name: Install smartctl_exporter (Arch)
aur:
name: prometheus-smartctl-exporter
use: "{{ aur_helper }}"
state: present
when: ansible_facts["os_family"] == "Archlinux"
- name: Enable and start smartctl_exporter service
ansible.builtin.systemd:
name: prometheus-smartctl-exporter
state: started
enabled: true
become: true