From 6f30dd81e946998a222cc95872a33548e856c7f5 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Fri, 20 Feb 2015 18:06:55 -0500 Subject: Rename nagios flag to manage_nagios This is so that we stay consistent between all shared modules that are using this pattern. --- manifests/service.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests') diff --git a/manifests/service.pp b/manifests/service.pp index 666826d..910f714 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -51,7 +51,7 @@ define stunnel::service ( $timeoutconnect = false, $timeoutidle = false, $transparent = false, - $use_nagios = false, + $manage_nagios = false, $verify = false ) { @@ -71,7 +71,7 @@ define stunnel::service ( mode => '0600'; } - if $use_nagios { + if $manage_nagios { nagios::service { "stunnel_${name}": check_command => "nagios-stat-proc!/usr/bin/stunnel4 /etc/stunnel/${name}.conf!6!5!proc"; } -- cgit v1.2.3 From d34962e4125d54e7de30601ca46471a49cd89757 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Fri, 20 Feb 2015 18:14:21 -0500 Subject: Split nagios resources into their own file. This will make it possible to manage nagios resources from a point external to this module in order to have more fine-grained control. --- manifests/service.pp | 4 +--- manifests/service/nagios.pp | 12 ++++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 manifests/service/nagios.pp (limited to 'manifests') diff --git a/manifests/service.pp b/manifests/service.pp index 910f714..fe36c2f 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -72,8 +72,6 @@ define stunnel::service ( } if $manage_nagios { - nagios::service { "stunnel_${name}": - check_command => "nagios-stat-proc!/usr/bin/stunnel4 /etc/stunnel/${name}.conf!6!5!proc"; - } + stunnel::service::nagios { $name: } } } diff --git a/manifests/service/nagios.pp b/manifests/service/nagios.pp new file mode 100644 index 0000000..578b417 --- /dev/null +++ b/manifests/service/nagios.pp @@ -0,0 +1,12 @@ +# Put a Nagios service check in place for a specific tunnel. +# +# The resource name will be used to point to the corresponding stunnel +# configuration file. +# +define stunnel::service::nagios () { + + nagios::service { "stunnel_${name}": + check_command => "nagios-stat-proc!/usr/bin/stunnel4 /etc/stunnel/${name}.conf!6!5!proc"; + } + +} -- cgit v1.2.3 From 6080f71be080860a20cf31cf491296ccbef7adb1 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Fri, 17 Apr 2015 12:09:17 -0400 Subject: incorporate changes from lelutin (#4285) --- manifests/centos.pp | 2 +- manifests/debian.pp | 4 ++-- manifests/service.pp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'manifests') diff --git a/manifests/centos.pp b/manifests/centos.pp index b9a326a..3b0a6e2 100644 --- a/manifests/centos.pp +++ b/manifests/centos.pp @@ -18,7 +18,7 @@ class stunnel::centos inherits stunnel::linux { Service['stunnel']{ hasstatus => true, - require => [ User['stunnel'], File['/etc/init.d/stunnel'] ] + require => [ User['stunnel'], File['/etc/init.d/stunnel'] ] } file { '/etc/stunnel/stunnel.conf': diff --git a/manifests/debian.pp b/manifests/debian.pp index eb4d57a..bde1e21 100644 --- a/manifests/debian.pp +++ b/manifests/debian.pp @@ -1,10 +1,10 @@ class stunnel::debian inherits stunnel::linux { - Package[stunnel] { + Package['stunnel'] { name => 'stunnel4', } - Service[stunnel] { + Service['stunnel'] { name => 'stunnel4', pattern => '/usr/bin/stunnel4', } diff --git a/manifests/service.pp b/manifests/service.pp index fe36c2f..421f496 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -66,7 +66,7 @@ define stunnel::service ( content => template('stunnel/service.conf.erb'), require => Package['stunnel'], notify => Exec['refresh_stunnel'], - owner => root, + owner => 'root', group => 0, mode => '0600'; } -- cgit v1.2.3