]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Fix: nodo::subsystem::sensors: move hddtemp portion to the bottom
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 5 Jul 2024 15:57:18 +0000 (12:57 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 5 Jul 2024 15:57:18 +0000 (12:57 -0300)
manifests/subsystem/sensors.pp

index 473def392a69a15fdd0e73d8124eed9c2bcda5f3..8a198314d3821aaa00ad2182b681a7a0e37ebe71 100644 (file)
@@ -21,6 +21,22 @@ class nodo::subsystem::sensors {
     ensure => $lm_sensors,
   }
 
+  #
+  # drivetemp
+  #
+  # Just load this driver and lm-sensors will detect sensors automatically.
+  #
+  # https://www.baeldung.com/linux/hdd-ssd-temperature
+  # https://askubuntu.com/questions/1426482/tool-to-monitor-hdd-temperature-in-ubuntu-server-22-04
+  # https://wiki.archlinux.org/title/Lm_sensors#S.M.A.R.T._drive_temperature
+  # https://github.com/philipl/drivetemp
+
+  $drivetemp = lookup('nodo::sensors::drivetemp', undef, undef, 'present')
+
+  nodo::subsystem::modprobe::module { 'drivetemp':
+    ensure => $drivetemp,
+  }
+
   #
   # hddtemp
   #
@@ -37,18 +53,4 @@ class nodo::subsystem::sensors {
       default  => absent,
     }
   }
-
-  #
-  # drivetemp
-  #
-  # https://www.baeldung.com/linux/hdd-ssd-temperature
-  # https://askubuntu.com/questions/1426482/tool-to-monitor-hdd-temperature-in-ubuntu-server-22-04
-  # https://wiki.archlinux.org/title/Lm_sensors#S.M.A.R.T._drive_temperature
-  # https://github.com/philipl/drivetemp
-
-  $drivetemp = lookup('nodo::sensors::drivetemp', undef, undef, 'present')
-
-  nodo::subsystem::modprobe::module { 'drivetemp':
-    ensure => $drivetemp,
-  }
 }