aboutsummaryrefslogtreecommitdiff
path: root/manifests/base/host.pp
blob: a2753c5ad930e3e1515a058bd77695acace16d69 (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
# Fully capable node able to host other nodes
class nodo::base::host {
  include nodo::subsystem::initramfs
  include nodo::subsystem::modprobe
  include nodo::subsystem::firewire
  include nodo::subsystem::sysctl
  include nodo::subsystem::resolver
  include nodo::utils::physical
  class { 'syslog-ng': }

  monkeysphere_host { "${::hostname}": }

  # Firewall
  class { 'firewall': }

  # Vserver
  if $::lsbdistcodename == 'squeeze' {
    $vserver = hiera('nodo::host::use_vserver', True)

    if $vserver == true {
      class { 'vserver::host':
        vdirbase => "/var/vservers",
      }
    }
  }

  # Time
  $ntpdate = hiera('nodo::host::ntpdate', True)
  case $ntpdate {
    false:   { class { 'timezone': } }
    default: { class { 'ntpdate':  } }
  }

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

  # Monitoring
  if !defined(Class['nodo::subsystem::monitor']) {
    class { 'nodo::subsystem::monitor':
      type => 'host',
    }
  }

  # Munin configuration
  $munin = hiera('nodo::host::use_munin', True)
  if $munin == true {
    munin_node { "$hostname":
      port => '4900',
    }
  }

}