diff options
Diffstat (limited to 'manifests/command')
-rw-r--r-- | manifests/command/smtp.pp | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/manifests/command/smtp.pp b/manifests/command/smtp.pp index 5cb777e..e4df505 100644 --- a/manifests/command/smtp.pp +++ b/manifests/command/smtp.pp @@ -1,18 +1,30 @@ class nagios::command::smtp { - nagios_command{ - 'check_smtp': - command_line => '$USER1$/check_smtp -H $ARG1$ -p $ARG2$', - ensure => $operatingsystem ? { - debian,ubuntu => absent, - default => present, - }; - 'check_smtp_tls': - command_line => '$USER1$/check_smtp -H $ARG1$ -p $ARG2$ -S'; - 'check_smtp_cert': - command_line => '$USER1$/check_smtp -H $ARG1$ -p $ARG2$ -S -D $ARG3$'; - 'check_ssmtp': - command_line => '$USER1$/check_ssmtp -H $ARG1$ -p $ARG2$ -S'; - 'check_ssmtp_cert': - command_line => '$USER1$/check_ssmtp -H $ARG1$ -p $ARG2$ -S -D $ARG3$'; + case $operatingsystem { + debian,ubuntu: { + nagios_command{ + 'check_smtp_tls': + command_line => '$USER1$/check_smtp -H $ARG1$ -p $ARG2$ -S'; + 'check_smtp_cert': + command_line => '$USER1$/check_smtp -H $ARG1$ -p $ARG2$ -S -D $ARG3$'; + 'check_ssmtp': + command_line => '$USER1$/check_ssmtp -H $ARG1$ -p $ARG2$ -S'; + 'check_ssmtp_cert': + command_line => '$USER1$/check_ssmtp -H $ARG1$ -p $ARG2$ -S -D $ARG3$'; + } + } + default: { + nagios_command{ + 'check_smtp': + command_line => '$USER1$/check_smtp -H $ARG1$ -p $ARG2$'; + 'check_smtp_tls': + command_line => '$USER1$/check_smtp -H $ARG1$ -p $ARG2$ -S'; + 'check_smtp_cert': + command_line => '$USER1$/check_smtp -H $ARG1$ -p $ARG2$ -S -D $ARG3$'; + 'check_ssmtp': + command_line => '$USER1$/check_ssmtp -H $ARG1$ -p $ARG2$ -S'; + 'check_ssmtp_cert': + command_line => '$USER1$/check_ssmtp -H $ARG1$ -p $ARG2$ -S -D $ARG3$'; + } + } } } |