diff options
author | Micah Anderson <micah@riseup.net> | 2013-04-03 13:19:05 -0400 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2013-04-03 13:19:05 -0400 |
commit | 724bc04aa9ece40fe2c54979afffdf53c5564758 (patch) | |
tree | 6966531eac36ad88b26ace1757d068059bb75f16 | |
parent | 0bec75e40e5aa4458c960242298ab455fcffc88e (diff) |
move the $use_nagios check into the stunnel::service define, where it is more
useful for creating accurate nagios-statd-proc checks for the correct stunnel names
-rw-r--r-- | manifests/init.pp | 11 | ||||
-rw-r--r-- | manifests/service.pp | 7 |
2 files changed, 7 insertions, 11 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 270540d..1204909 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -24,15 +24,4 @@ class stunnel ( $ensure_version = 'present', $startboot = '1', $default_extra ) centos: { class { 'stunnel::centos': } } default: { class { 'stunnel::default': } } } - - if $use_nagios { - case $nagios_stunnel_procs { - false: { info("We aren't doing nagios checks for stunnel on ${::fqdn}" ) } - default: { nagios::service - { 'stunnel': - check_command => 'nagios-stat-proc!/usr/bin/stunnel4!6!5!proc'; - } - } - } - } } diff --git a/manifests/service.pp b/manifests/service.pp index b925d00..fd64f9b 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -51,6 +51,7 @@ define stunnel::service ( $timeoutconnect = false, $timeoutidle = false, $transparent = false, + $use_nagios = false, $verify = false ) { @@ -66,4 +67,10 @@ define stunnel::service ( group => 0, mode => '0600'; } + + if $use_nagios { + nagios::service { "stunnel_${name}": + check_command => "nagios-stat-proc!/usr/bin/stunnel4 /etc/stunnel/${name}.conf!6!5!proc"; + } + } } |