summaryrefslogtreecommitdiff
path: root/manifests/daemon/onion_service.pp
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2017-08-30 18:30:12 +0200
committermh <mh@immerda.ch>2017-08-30 18:30:12 +0200
commit1fcbe72115d57d53fced2777c8b54a4ee4ec17e9 (patch)
tree84f2a8c9c60de39b14b41f69ba6f4232b108d055 /manifests/daemon/onion_service.pp
parent1fef62f18dcbcf0f1995603b8f595f67ebf483d5 (diff)
make it work with newer concat module
Diffstat (limited to 'manifests/daemon/onion_service.pp')
-rw-r--r--manifests/daemon/onion_service.pp17
1 files changed, 9 insertions, 8 deletions
diff --git a/manifests/daemon/onion_service.pp b/manifests/daemon/onion_service.pp
index 2625521..9d12a3a 100644
--- a/manifests/daemon/onion_service.pp
+++ b/manifests/daemon/onion_service.pp
@@ -1,6 +1,6 @@
# onion services definition
define tor::daemon::onion_service(
- $ensure = present,
+ $ensure = 'present',
$ports = [],
$data_dir = $tor::daemon::data_dir,
$private_key = undef,
@@ -9,16 +9,17 @@ define tor::daemon::onion_service(
) {
$data_dir_path = "${data_dir}/${name}"
- include ::tor::daemon::params
- concat::fragment { "05.onion_service.${name}":
- ensure => $ensure,
- content => template('tor/torrc.onion_service.erb'),
- order => '05',
- target => $tor::daemon::config_file,
+ if $ensure == 'present' {
+ include ::tor::daemon::params
+ concat::fragment { "05.onion_service.${name}":
+ content => template('tor/torrc.onion_service.erb'),
+ order => '05',
+ target => $tor::daemon::config_file,
+ }
}
if $private_key or ($private_key_name and $private_key_store_path) {
if $private_key and ($private_key_name and $private_key_store_path) {
- fail("Either private_key OR (private_key_name AND private_key_store_path) must be set, but not all three of them")
+ fail('Either private_key OR (private_key_name AND private_key_store_path) must be set, but not all three of them')
}
if $private_key_store_path and $private_key_name {
$tmp = generate_onion_key($private_key_store_path,$private_key_name)