summaryrefslogtreecommitdiff
path: root/puppet/modules/stunnel/manifests/service.pp
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2016-11-04 10:54:28 -0400
committerMicah Anderson <micah@riseup.net>2016-11-04 10:54:28 -0400
commit34a381efa8f6295080c843f86bfa07d4e41056af (patch)
tree9282cf5d4c876688602705a7fa0002bc4a810bde /puppet/modules/stunnel/manifests/service.pp
parent0a72bc6fd292bf9367b314fcb0347c4d35042f16 (diff)
parent5821964ff7e16ca7aa9141bd09a77d355db492a9 (diff)
Merge branch 'develop'
Diffstat (limited to 'puppet/modules/stunnel/manifests/service.pp')
m---------puppet/modules/stunnel0
-rw-r--r--puppet/modules/stunnel/manifests/service.pp79
2 files changed, 79 insertions, 0 deletions
diff --git a/puppet/modules/stunnel b/puppet/modules/stunnel
deleted file mode 160000
-Subproject 523612fb6daff51837423619f5014e62dc83555
diff --git a/puppet/modules/stunnel/manifests/service.pp b/puppet/modules/stunnel/manifests/service.pp
new file mode 100644
index 00000000..8a98d8ff
--- /dev/null
+++ b/puppet/modules/stunnel/manifests/service.pp
@@ -0,0 +1,79 @@
+define stunnel::service (
+ $ensure = present,
+ $accept = false,
+ $capath = false,
+ $cafile = false,
+ $cert = false,
+ $chroot = false,
+ $ciphers = false,
+ $client = false,
+ $compress = false,
+ $connect = false,
+ $crlpath = false,
+ $crlfile = false,
+ $debuglevel = false,
+ $delay = false,
+ $egd = false,
+ $engine = false,
+ $engineCtrl = false,
+ $enginenum = false,
+ $exec = false,
+ $execargs = false,
+ $failover = false,
+ $ident = false,
+ $key = false,
+ $local = false,
+ $oscp = false,
+ $ocspflag = false,
+ $options = false,
+ $output = false,
+ $pid = false,
+ $protocol = false,
+ $protocolauthentication = false,
+ $protocolhost = false,
+ $protocolpassword = false,
+ $protocolusername = false,
+ $pty = false,
+ $retry = false,
+ $rndbytes = false,
+ $rndfile = false,
+ $rndoverwrite = false,
+ $service = false,
+ $session = false,
+ $setuid = 'stunnel4',
+ $setgid = 'stunnel4',
+ $socket = [ 'l:TCP_NODELAY=1', 'r:TCP_NODELAY=1'],
+ $sslversion = 'SSLv3',
+ $stack = false,
+ $syslog = false,
+ $timeoutbusy = false,
+ $timeoutclose = false,
+ $timeoutconnect = false,
+ $timeoutidle = false,
+ $transparent = false,
+ $manage_nagios = false,
+ $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';
+ }
+
+ if $manage_nagios {
+ stunnel::service::nagios { $name: }
+ }
+}