class nodo::base::vserver {
  class { '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.
      Munin_node        <<| title == $::hostname |>>
      Monkeysphere_host <<| title == $::hostname |>>
    }
    "third-party": {
      # Apply munin and monkeysphere configuration for
      # nodes hosted by third-parties.
      munin_node { "${::hostname}": }
      monkeysphere_host { "${::hostname}":
        port => hiera('nodo::vserver::ssh_port', '22'),
      }

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

}