refactoring, part 1

This commit is contained in:
Udo Waechter
2014-05-26 13:03:17 +02:00
parent fcd9506f20
commit a4e9e691b4
8 changed files with 79 additions and 58 deletions

View File

@@ -0,0 +1,20 @@
class puppet::monitored::client (
$ensure = 'present') {
$check = '/usr/lib/nagios/plugins/check_file_age -w10800 -c36000 -f/var/lib/puppet/state/last_run_summary.yaml'
icinga::object::hostgroupmember { 'puppet-clients': ensure => 'absent', }
sudo::conf { 'puppet-clients-icinga-sudo':
content => "nagios ALL=NOPASSWD: ${check}",
ensure => $ensure,
}
massive_passive::icinga::service { 'Puppet last run':
freshness_threshold => '5800',
command => "/usr/bin/sudo ${check}",
use => 'workhours-passive-service',
hostgroup_name => 'linux-servers',
notifications_enabled => 1,
ensure => $ensure,
}
}