infra/roles/hypervisor/tasks/smartmontools.yaml

28 lines
785 B
YAML
Raw Permalink Normal View History

2024-08-05 07:19:14 +00:00
- name: Install smartmontools
apt:
name: smartmontools
- name: download smartctl_exporter
get_url:
url: https://git.janky.solutions/api/packages/JankySolutions/generic/infra-smartctl-exporter/0daa62681994c374e0915dbff2125f1bd8693e00/smartctl_exporter
checksum: sha256:01af30f3f46db761b8721dff3dd7517cb5c6d82ae4cd919fbfac0c43d8a78e90
dest: /usr/local/bin/smartctl_exporter
mode: "0755"
notify:
- restart smartctl_exporter
- name: install smartctl_exporter service
template:
src: smartctl_exporter.service
dest: /etc/systemd/system/smartctl_exporter.service
notify:
- systemctl daemon-reload
- restart smartctl_exporter
- meta: flush_handlers
- name: enable smartctl_exporter
service:
name: smartctl_exporter
enabled: true