summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-04-03 13:59:31 -0400
committerMicah Anderson <micah@riseup.net>2013-04-03 14:09:58 -0400
commitb53d574250598178af298c59be957693eaaddb22 (patch)
treed0cb21fa124565840fbcc76644bdeb281b0b9747
parentfb9fcfaa8bb27cb8ceeaa2090ee28c737c540e40 (diff)
remove variable defaults, they are handled by the paramterization of the class
make sure template variables are properly looked up.
-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') %>