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

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

if lookup({name => 'nagios.monitor', default_value => true}) {
  $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',
    hostgroups => 'linux',
    check_command => 'check-host-alive',
  }
}

# https://github.com/alexpdp7/ragent/issues/352
if $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '9' {
  package {'compat-openssl11':}
}

if $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == "10" {
  service {'dev-mqueue.mount':
    ensure => stopped,
    enable => mask,
  }
  ~>
  Exec['/usr/bin/systemctl reset-failed']
}