diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-07-13 20:03:04 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-07-13 20:03:04 -0300 |
commit | 86a6c028e16a09cdbc2458c117b405898c885688 (patch) | |
tree | 425f443975b5b93050d989b0f4e784dca2ac5690 /manifests | |
parent | 5df607a33d87ba8ab86a4116669ed2bc61c7131c (diff) |
Debian doesn't need explicit check_smtp definition (2)
This plugin is already defined at nagios-plugins, so removing it
for the same reason as e7f85f647e6f641bd85fbdfdb26982350f782370.
This commit has more readable implementation than the previous.
Diffstat (limited to 'manifests')
-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$'; + } + } } } |