diff options
author | Micah <micah@leap.se> | 2016-07-12 16:46:21 -0400 |
---|---|---|
committer | Micah <micah@leap.se> | 2016-07-12 16:46:21 -0400 |
commit | 04279dd8d1390d61d696d2c14817199304ccd4d8 (patch) | |
tree | bd6b3cf6f612f822ca3aa6823287f87f7c784390 /puppet/modules/stunnel/manifests/service.pp | |
parent | 297fadc8e6ad4729589d4ec21683f05a1e50bdf9 (diff) |
git subrepo clone https://leap.se/git/puppet_stunnel puppet/modules/stunnel
subrepo:
subdir: "puppet/modules/stunnel"
merged: "523612f"
upstream:
origin: "https://leap.se/git/puppet_stunnel"
branch: "master"
commit: "523612f"
git-subrepo:
version: "0.3.0"
origin: "https://github.com/ingydotnet/git-subrepo"
commit: "1e79595"
Change-Id: If384c84c99d9cabc67d2b4b9d7d2fbfa4a47550a
Diffstat (limited to 'puppet/modules/stunnel/manifests/service.pp')
-rw-r--r-- | puppet/modules/stunnel/manifests/service.pp | 79 |
1 files changed, 79 insertions, 0 deletions
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: } + } +} |