X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fonion%2Fmanifests%2Fservice.pp;fp=modules%2Fonion%2Fmanifests%2Fservice.pp;h=08b892a02744ad9a71344c2b5e62b110e1138ee1;hb=5712e0084ff0cf829d43268c975b1e88ce7b653e;hp=726f6c850ae9d9d5c029cb079c047eb6f6359751;hpb=68ac1934cb606b4265e07a3907857078d95b9532;p=mirror%2Fdsa-puppet.git 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", }