diff options
author | varac <varacanero@zeromail.org> | 2016-06-09 17:34:32 +0200 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2016-06-14 12:05:18 +0200 |
commit | d2c8498b41bebc6a06216515b3cf75564b8fb61a (patch) | |
tree | 35a82a51e37c75db2c819d0bda8df832619b143c /puppet/modules/stunnel/manifests/init.pp | |
parent | 77450777e17522cc56874e35cceed997378ff3f1 (diff) |
git subrepo clone https://leap.se/git/puppet_stunnel puppet/modules/stunnel
subrepo:
subdir: "puppet/modules/stunnel"
merged: "008777b"
upstream:
origin: "https://leap.se/git/puppet_stunnel"
branch: "master"
commit: "008777b"
git-subrepo:
version: "0.3.0"
origin: "https://github.com/ingydotnet/git-subrepo.git"
commit: "cb2995b"
Diffstat (limited to 'puppet/modules/stunnel/manifests/init.pp')
-rw-r--r-- | puppet/modules/stunnel/manifests/init.pp | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/puppet/modules/stunnel/manifests/init.pp b/puppet/modules/stunnel/manifests/init.pp new file mode 100644 index 00000000..f38a2020 --- /dev/null +++ b/puppet/modules/stunnel/manifests/init.pp @@ -0,0 +1,63 @@ +# +# stunnel puppet module +# +# Copyright 2009, Riseup Networks <micah@riseup.net> +# +# +# This program is free software; you can redistribute +# it and/or modify it under the terms of the GNU +# General Public License version 3 as published by +# the Free Software Foundation. +# +# 1. include stunnel: this will automatically include stunnel::debian, +# which automatically includes stunnel::linux, which automatically +# includes stunnel::base +# 2. stunnel::client allows you to configure different /etc/stunnel/*.conf files +# to provide various stunnel configurations + +# TODO: warn on cert/key issues, fail on false accept? + +class stunnel ( + $ensure_version = 'present', + $startboot = '1', + $default_extra = '', + $cluster = '' ) +{ + + case $::operatingsystem { + debian: { class { 'stunnel::debian': } } + centos: { class { 'stunnel::centos': } } + default: { class { 'stunnel::default': } } + } + + $stunnel_staging = "${::puppet_vardir}/stunnel4" + $stunnel_compdir = "${stunnel_staging}/configs" + + file { + [ $stunnel_staging, "${stunnel_staging}/bin" ]: + ensure => directory, + owner => 0, + group => 0, + mode => '0750'; + + "${stunnel_staging}/configs": + ensure => directory, + owner => 0, + group => 0, + mode => '0750', + recurse => true, + purge => true, + force => true, + source => undef; + + "${stunnel_staging}/bin/refresh_stunnel.sh": + owner => 0, + group => 0, + mode => '0755', + content => template('stunnel/refresh_stunnel.sh.erb'); + } + + exec { 'refresh_stunnel': + command => "${stunnel_staging}/bin/refresh_stunnel.sh" + } +} |