aboutsummaryrefslogtreecommitdiff
path: root/personal_infra/puppet/site/00-common.pp
blob: 58c035cdbb5144c8568e43ad90abf630eef7d37a (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
include automatic_updates
include basic_software
include root_mail

if $facts['os']['family'] == 'Debian' {
  class {'debian':}
}

$nagios_host = $facts['networking']['fqdn']

nagios_host {$nagios_host:
  use => 'generic-host',
  address => lookup({name => 'nagios.address', default_value => $facts['networking']['fqdn']}),
  max_check_attempts => 5,
  contact_groups => "admins",
  check_command => "check-host-alive",
}

nagios_service {"${nagios_host}-ssh":
  use => 'generic-service',
  host_name => $facts['networking']['fqdn'],
  service_description => "ssh",
  check_command => "check_ssh",
}