From c46fa52e5b14e1c3e121d43bb3a9561158be2729 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 13 Jul 2011 20:19:31 -0300 Subject: Do not define check_imap on debian --- manifests/command/imap_pop3.pp | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/manifests/command/imap_pop3.pp b/manifests/command/imap_pop3.pp index 174b09c..082a360 100644 --- a/manifests/command/imap_pop3.pp +++ b/manifests/command/imap_pop3.pp @@ -1,14 +1,31 @@ class nagios::command::imap_pop3 { - nagios_command{ - 'check_imap': - command_line => '$USER1$/check_imap -H $ARG1$ -p $ARG2$'; - 'check_imap_ssl': - command_line => '$USER1$/check_imap -H $ARG1$ -p $ARG2$ -S'; - 'check_pop3': - command_line => '$USER1$/check_pop -H $ARG1$ -p $ARG2$'; - 'check_pop3_ssl': - command_line => '$USER1$/check_pop -H $ARG1$ -p $ARG2$ -S'; - 'check_managesieve': - command_line => '$USER1$/check_tcp -H $ARG1$ -p 2000'; + case $operatingsystem { + debian,ubuntu: { + nagios_command { + 'check_imap_ssl': + command_line => '$USER1$/check_imap -H $ARG1$ -p $ARG2$ -S'; + 'check_pop3': + command_line => '$USER1$/check_pop -H $ARG1$ -p $ARG2$'; + 'check_pop3_ssl': + command_line => '$USER1$/check_pop -H $ARG1$ -p $ARG2$ -S'; + 'check_managesieve': + command_line => '$USER1$/check_tcp -H $ARG1$ -p 2000'; + } + } + default: { + nagios_command { + 'check_imap': + command_line => '$USER1$/check_imap -H $ARG1$ -p $ARG2$'; + 'check_imap_ssl': + command_line => '$USER1$/check_imap -H $ARG1$ -p $ARG2$ -S'; + 'check_pop3': + command_line => '$USER1$/check_pop -H $ARG1$ -p $ARG2$'; + 'check_pop3_ssl': + command_line => '$USER1$/check_pop -H $ARG1$ -p $ARG2$ -S'; + 'check_managesieve': + command_line => '$USER1$/check_tcp -H $ARG1$ -p 2000'; + } + } } + } -- cgit v1.2.3