summaryrefslogtreecommitdiff
path: root/roles/monitoring/prometheus/exporter/node/tasks/textfile_collector_smartmon.yml
blob: 8da763cd6a9ba547e23f1c2708bddbc7045beb08 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
---
- name: install smartmontools
  apt:
    name: smartmontools
    state: present

- name: make sure smartd service is stopped and masked
  when: (ansible_distribution == 'Debian' and (ansible_distribution_major_version | int) < 11) or (ansible_distribution == 'Ubuntu' and (ansible_distribution_major_version | int) < 20)
  systemd:
    name: smartd.service
    state: stopped
    masked: yes

- name: make sure smartmontools service is stopped and masked
  systemd:
    name: smartmontools.service
    state: stopped
    masked: yes

- name: install the smartmon textfile collector script
  include_tasks: textfile_collector_generic.yml