class nodo::subsystem::sensors { # # SMART monitoring # $smartmontools = lookup('nodo::sensors::smartmontools', undef, undef, 'present') if $smartmontools == 'present' { class { 'smartmontools': } } # # LM Sensors # $lm_sensors = lookup('nodo::sensors::lm_sensors', undef, undef, 'present') package { [ 'lm-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 # # Deprecated in favor of drivetemp: # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1002484 package { [ 'hddtemp', ]: ensure => $::lsbdistcodename ? { 'wheezy' => present, 'buster' => present, 'bullseye' => present, default => absent, } } }