From 6abc58229f057a63e1799c834538d5fb139c6e22 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 10 May 2024 00:19:23 +0200 Subject: migrate all os release comparisons to use new filter --- .../prometheus/exporter/node/tasks/textfile_collector_smartmon.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'roles/monitoring') diff --git a/roles/monitoring/prometheus/exporter/node/tasks/textfile_collector_smartmon.yml b/roles/monitoring/prometheus/exporter/node/tasks/textfile_collector_smartmon.yml index 8da763cd..4825e552 100644 --- a/roles/monitoring/prometheus/exporter/node/tasks/textfile_collector_smartmon.yml +++ b/roles/monitoring/prometheus/exporter/node/tasks/textfile_collector_smartmon.yml @@ -5,7 +5,8 @@ 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) + when: (ansible_distribution == 'Debian' and (ansible_distribution_release | debian_release_compare('<', 'bullseye'))) or + (ansible_distribution == 'Ubuntu' and (ansible_distribution_release | ubuntu_release_compare('<', 'focal'))) systemd: name: smartd.service state: stopped -- cgit v1.2.3