aboutsummaryrefslogtreecommitdiff
path: root/manifests/base/physical.pp
blob: eae94a4dfb8a35f6ba4c9b69bcd6f056e66cf98e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
class nodo::base::physical inherits nodo::base::host {
  class { [ 'nodo::subsystem::ups', 'smartmontools' ]: }

  # SMART and sensors monitoring
  $munin = hiera('nodo::host::use_munin', True)
  if $munin == true {
    include munin::plugins::smart

    munin::plugin { 'smart_sda':
      ensure => 'smart_',
      config => "user root\ngroup disk",
    }

    munin::plugin { 'hddtemp_smartctl':
      ensure => present,
      config => "user root\ngroup disk\nenv.drives sda",
    }

    package { 'lm-sensors':
      ensure => present,
    }

    munin::plugin { [ 'sensors_fan', 'sensors_volt', 'sensors_temp' ]:
      ensure => 'sensors_',
    }
  }

  # Entropy key
  $ekey_masterkey = hiera('nodo::physical::ekey_masterkey', '')
  if $ekey_masterkey != '' {
    class { "ekeyd":
      ekeyd_masterkey => $ekey_masterkey,
    }

    # We can also use ekeyd::munin
    munin::plugin { [ 'ekeyd_stat_KeyTemperatureC', 'ekeyd_stat_KeyTemperatureF',
                      'ekeyd_stat_KeyTemperatureK', 'ekeyd_stat_TotalEntropy',
                      'ekeyd_stat_KeyVoltage',      'ekeyd_stat_FipsFrameRate',
                      'ekeyd_stat_EntropyRate',     'ekeyd_stat' ]:
      ensure => 'ekeyd_stat_',
      config => 'user root',
    }
  }
}