summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/debian.pp14
-rw-r--r--manifests/init.pp1
-rw-r--r--manifests/linux.pp1
-rw-r--r--templates/Debian/default4
4 files changed, 3 insertions, 17 deletions
diff --git a/manifests/debian.pp b/manifests/debian.pp
index ee2a2f1..eb4d57a 100644
--- a/manifests/debian.pp
+++ b/manifests/debian.pp
@@ -9,20 +9,6 @@ class stunnel::debian inherits stunnel::linux {
pattern => '/usr/bin/stunnel4',
}
- # make the /etc/default/stunnel ENABLED configurable with a variable
- # and default to on
- case $stunnel::startboot {
- '': { $stunnel::startboot = '1' }
- default: { $stunnel::startboot = '1' }
- }
-
- # make the /etc/default/stunnel extra configurable with a variable
- # and default to adding nothing to the default file
- case $stunnel::default_extra {
- '': { $stunnel::default_extra = '' }
- default: { $stunnel::default_extra = '' }
- }
-
file { '/etc/default/stunnel4':
content => template('stunnel/Debian/default'),
require => Package['stunnel4'],
diff --git a/manifests/init.pp b/manifests/init.pp
index 1204909..f7f72b8 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -19,6 +19,7 @@
class stunnel ( $ensure_version = 'present', $startboot = '1', $default_extra )
{
+
case $::operatingsystem {
debian: { class { 'stunnel::debian': } }
centos: { class { 'stunnel::centos': } }
diff --git a/manifests/linux.pp b/manifests/linux.pp
index 972f21c..a4a926e 100644
--- a/manifests/linux.pp
+++ b/manifests/linux.pp
@@ -1,6 +1,5 @@
class stunnel::linux inherits stunnel::base {
- if $stunnel::ensure_version == '' { $stunnel::ensure_version = 'installed' }
package { 'stunnel':
ensure => $stunnel::ensure_version
}
diff --git a/templates/Debian/default b/templates/Debian/default
index ccfefa5..9e2f4d3 100644
--- a/templates/Debian/default
+++ b/templates/Debian/default
@@ -3,11 +3,11 @@
# September 2003
# Change to one to enable stunnel automatic startup
-ENABLED=<%= startboot %>
+ENABLED=<%= scope.lookupvar('stunnel::startboot') %>
FILES="/etc/stunnel/*.conf"
OPTIONS=""
# Change to one to enable ppp restart scripts
PPP_RESTART=0
-<%= default_extra %>
+<%= scope.lookupvar('stunnel::default_extra') %>