aboutsummaryrefslogtreecommitdiff
path: root/manifests/host.pp
blob: 0d27d7a257b9c10a72fd01fdb65ca08b9a85c69c (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
# Fully capable node able to host other nodes
class nodo::host inherits nodo {
  include initramfs
  include modprobe
  include firewire
  include sysctl
  include utils::physical
  include resolver
  include monkeysphere_nodo

  class { 'syslog-ng': }

  # Firewall configuration
  include firewall

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

  # Monitoring
  if !defined('monitor') {
    class { 'monitor':
      type       => 'host',
      use_nagios => hiera('host_use_nagios', True),
    }
  }

  # 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", '127.0.0.1' ] }
  }

  class { 'sshd':
    listen_address          => $sshd_listen_address,
    password_authentication => $sshd_password_authentication,
    shared_ip               => $sshd_shared_ip,
    tcp_forwarding          => $sshd_tcp_forwarding,
    hardened_ssl            => $sshd_hardened_ssl,
    print_motd              => $sshd_print_motd,
    ports                   => $sshd_ports,
    use_pam                 => $sshd_use_pam,
  }

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

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

}