Commit 2686d126 authored by Markus Frosch's avatar Markus Frosch
Browse files

selftest: Add update check for RedHat

parent 5d515021
......@@ -28,6 +28,9 @@ class icinga2_testing::profiles::selftest(
"${config_base}/templates.conf":
ensure => file,
content => template('icinga2_testing/selftest/templates.conf.erb');
"${config_base}/commands.conf":
ensure => file,
content => template('icinga2_testing/selftest/commands.conf.erb');
"${config_base}/hosts.conf":
ensure => file,
content => template('icinga2_testing/selftest/hosts.conf.erb');
......
#######################################
# Icinga 2 selftest configuration
# Managed by Puppet
#######################################
object CheckCommand "updates" {
import "plugin-check-command"
command = [ PluginDir + "/check_updates" ]
arguments = {
"-w" = "$updates_warning$"
"-c" = "$updates_critical$"
"--security-only" = {
set_if = "$updates_security_only$"
}
"-t" = "$updates_timeout$"
}
}
......@@ -121,13 +121,17 @@ apply Service "running_kernel" {
check_command = "running_kernel"
assign where host.vars.role == "icinga"
assign where host.vars.role == "icinga" && host.vars.osfamily == "Debian"
}
apply Service "updates" {
import "agent-service"
check_command = "apt"
if (host.vars.osfamily == "Debian") {
check_command = "apt"
else if (host.vars.osfamily == "RedHat") {
check_command = "updates"
}
assign where host.vars.role == "icinga"
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment