Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

Provide a way to create stunnel::tun resources via a parameter #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
# By default we look this value up in a stunnel::data class, which has a
# list of common answers.
#
# [*tunnels*]
# A hash of tunnels that should be created, commonly provided via hiera
#
# === Examples
#
# include stunnel
Expand All @@ -35,7 +38,8 @@
class stunnel(
$package = $stunnel::params::package,
$service = $stunnel::params::service,
$conf_dir = $stunnel::params::conf_dir
$conf_dir = $stunnel::params::conf_dir,
$tunnels = {},
) inherits stunnel::params {

package { $package:
Expand Down Expand Up @@ -67,4 +71,8 @@
hasstatus => false,
}
}

if !empty($tunnels){
create_resources('stunnel::tun', $tunnels)
}
}