$onion_hn = onion_tor_service_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: ${hostname_without_onion}\n name: ${hostname}-${name}\n",
- order => "50-${name}-20",
- tag => "onion::balance::$name",
- }
if ($direct) {
@@concat::fragment { "onion::balance::onionbalance-services.yaml::${name}":
}
}
}
+ } elsif ($my_ensure == "absent") {
+ file { "/var/lib/tor/onion/${name}":
+ ensure => absent,
+ force => true,
+ }
+ } else {
+ fail("Invalid ensure value ${my_ensure}")
}
}