From 5712e0084ff0cf829d43268c975b1e88ce7b653e Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Fri, 29 Jul 2016 07:18:11 +0000 Subject: [PATCH] remove .onion from configured address for onionbalance --- modules/onion/manifests/service.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/onion/manifests/service.pp b/modules/onion/manifests/service.pp index 726f6c850..08b892a02 100644 --- a/modules/onion/manifests/service.pp +++ b/modules/onion/manifests/service.pp @@ -13,9 +13,10 @@ define onion::service ( $onion_hn = onion_hostname($name) if $onion_hn { + $hostname_without_onion = regsubst($onion_hn, '\.onion$', '') @@concat::fragment { "onion::balance::instance::$name::$fqdn": target => "/etc/onionbalance/config.yaml", - content => " - address: ${onion_hn}\n name: ${hostname}-${name}\n", + content => " - address: ${hostname_without_onion}\n name: ${hostname}-${name}\n", order => "50-${name}-20", tag => "onion::balance::$name", } -- 2.20.1