From e8a2d09938ba49baed7aef06e205357e58eca024 Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Tue, 7 Jan 2025 08:38:10 +0000
Subject: [PATCH] Do not install smartmontools

This is now part of base "float".
---
 roles/ai3-base/handlers/main.yml        |  5 -----
 roles/ai3-base/tasks/prod.yml           | 11 -----------
 roles/ai3-base/templates/smartd.conf.j2 |  8 --------
 3 files changed, 24 deletions(-)
 delete mode 100644 roles/ai3-base/templates/smartd.conf.j2

diff --git a/roles/ai3-base/handlers/main.yml b/roles/ai3-base/handlers/main.yml
index 58c9409a..d48b9a9b 100644
--- a/roles/ai3-base/handlers/main.yml
+++ b/roles/ai3-base/handlers/main.yml
@@ -7,8 +7,3 @@
   systemd:
     name: auditd.service
     state: restarted
-
-- listen: restart smartd
-  systemd:
-    name: smartd.service
-    state: restarted
diff --git a/roles/ai3-base/tasks/prod.yml b/roles/ai3-base/tasks/prod.yml
index 91d4bf89..1571d7fb 100644
--- a/roles/ai3-base/tasks/prod.yml
+++ b/roles/ai3-base/tasks/prod.yml
@@ -30,7 +30,6 @@
     state: present
   vars:
     packages:
-      - smartmontools
       - pciutils
       - ethtool
       - intel-microcode
@@ -41,13 +40,3 @@
     state: present
   when: "'nvme0n1' in ansible_devices"
 
-- name: Configure smartd
-  template:
-    src: smartd.conf.j2
-    dest: /etc/smartd.conf
-  notify: restart smartd
-
-- name: Disable smartd emails
-  file:
-    path: /etc/smartmontools/run.d/10mail
-    state: absent
diff --git a/roles/ai3-base/templates/smartd.conf.j2 b/roles/ai3-base/templates/smartd.conf.j2
deleted file mode 100644
index a4c7c247..00000000
--- a/roles/ai3-base/templates/smartd.conf.j2
+++ /dev/null
@@ -1,8 +0,0 @@
-# Long tests once a month, on the 15th at 15.00
-# Short tests every Monday at 11.00
-DEFAULT -a -s (L/../15/./15|S/../../1/11) -m {{ alert_email }} -M exec /usr/share/smartmontools/smartd-runner
-
-# Host specific configuration
-{{ smartd_extra_config | default('') }}
-
-DEVICESCAN {{ '-d nvme' if 'nvme0n1' in ansible_devices else '' }}
-- 
GitLab