aboutsummaryrefslogtreecommitdiff
path: root/manifests/base/virtual.pp
blob: 7852d79b405f20fd9c0a9b0e438c4fe6ad9621c3 (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
class nodo::base::virtual {
  class { 'ntp::timezone': }
  class { 'syslog-ng::vserver': }

  backupninja::sys { "sys":
    ensure     => present,
    partitions => false,
    hardware   => false,
    dosfdisk   => false,
    dohwinfo   => false,
  }

  $hosting_type = hiera('nodo::vserver::hosting_type', 'direct')

  case $hosting_type {
    "direct": {
      # Apply munin and monkeysphere configuration for
      # for directly hosted nodes.
      Nodo::Subsystem::Monitor::Munin <<| title == $::hostname |>>
      Nodo::Subsystem::Monkeysphere   <<| title == $::hostname |>>
    }
    "third-party": {
      # Apply munin and monkeysphere configuration for
      # nodes hosted by third-parties.
      nodo::subsystem::monitor::munin { "${::hostname}": }
      monkeysphere_host { "${::hostname}":
        port => hiera('nodo::vserver::ssh_port', '22'),
      }

      # Nagios configuration
      class { 'nodo::subsystem::monitor': }
    }
  }

}