include stunnel in stunnel::service (https://leap.se/code/issues/3861)
authorvarac <varacanero@zeromail.org>
Tue, 17 Sep 2013 15:23:07 +0000 (17:23 +0200)
committervarac <varacanero@zeromail.org>
Tue, 17 Sep 2013 15:23:07 +0000 (17:23 +0200)
manifests/service.pp

index 666826d..b041833 100644 (file)
@@ -55,20 +55,19 @@ define stunnel::service (
   $verify = false
 ) {
 
+  include stunnel
+
   $real_client = $client ? { default => 'yes' }
   $real_pid = $pid ? { false => "/${name}.pid", default => $pid }
 
-  $stunnel_compdir = "${::puppet_vardir}/stunnel4/configs"
-
-  file {
-    "${stunnel_compdir}/${name}.conf":
-      ensure  => $ensure,
-      content => template('stunnel/service.conf.erb'),
-      require => Package['stunnel'],
-      notify  => Exec['refresh_stunnel'],
-      owner   => root,
-      group   => 0,
-      mode    => '0600';
+  file { "/etc/stunnel/${name}.conf":
+    ensure  => $ensure,
+    content => template('stunnel/service.conf.erb'),
+    require => File['/etc/stunnel'],
+    notify  => Service[stunnel],
+    owner   => root,
+    group   => 0,
+    mode    => '0600';
   }
 
   if $use_nagios {