diff options
author | Christian Pointner <equinox@spreadspace.org> | 2021-10-15 18:24:52 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2021-10-15 18:24:52 +0200 |
commit | d83c9a50fa29f51e3195929c62f4946cab8c50c5 (patch) | |
tree | b8b8a01a4e1db5bbc6a0004315efeca2aabe0688 /roles/monitoring/prometheus/exporter/node/tasks/textfile_collector_smartmon.yml | |
parent | fix group_vars precedence for accesspoints (diff) |
prometheus: fix smartmon textfile collector
Diffstat (limited to 'roles/monitoring/prometheus/exporter/node/tasks/textfile_collector_smartmon.yml')
-rw-r--r-- | roles/monitoring/prometheus/exporter/node/tasks/textfile_collector_smartmon.yml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/roles/monitoring/prometheus/exporter/node/tasks/textfile_collector_smartmon.yml b/roles/monitoring/prometheus/exporter/node/tasks/textfile_collector_smartmon.yml new file mode 100644 index 00000000..8da763cd --- /dev/null +++ b/roles/monitoring/prometheus/exporter/node/tasks/textfile_collector_smartmon.yml @@ -0,0 +1,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 |