aboutsummaryrefslogtreecommitdiff
path: root/manifests/physical.pp
blob: 4805a53dea8ab9cf5b5fa314b76ecc2a4d1ef341 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
class nodo::physical inherits nodo {
  include syslog-ng
  include firewall
  include initramfs
  include modprobe
  include firewire
  include sysctl
  include ups
  include utils::physical
  include smartmontools
  include resolver
  include monkeysphere_nodo

  # Vserver configuration
  $vserver_vdirbase = "/var/vservers"
  include vserver::host

  if $use_nagios != false {
    include nagios::target
    nagios::service::ping { "$fqdn": }
  }

  # Time configuration
  case $ntpdate {
    false:   { include timezone }
    default: { include ntpdate  }
  }

  # SSH Server
  #
  # We need to restrict listen address so multiple instances
  # can live together in the same physical host.
  #
  case $sshd_listen_address {
    '': { $sshd_listen_address = [ "$ipaddress" ] }
  }
  include sshd

  backupninja::sys { "sys":
    ensure => present,
  }

  # Munin configuration
  munin_node { "$hostname":
    port => '4900',
  }

  # SMART monitoring
  include munin::plugins::smart
  munin::plugin { "smart_sda":
    ensure => "smart_",
    config => "user root\ngroup disk",
  }

  # Removable media folder
  file { [ "/media/usb", "/media/cdrom" ]:
    ensure => directory,
    mode   => 0755,
  }

  # Entropy key
  if $ekey_masterkey != '' {
    class { "ekeyd":
      ekeyd_masterkey => $ekey_masterkey,
    }
  }
}