From f6cefbee404664e2012abed89ec7f2f3128d23b6 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 9 Jan 2019 20:05:34 -0200 Subject: Support for HiddenServiceVersion --- manifests/site.pp | 80 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 41 insertions(+), 39 deletions(-) diff --git a/manifests/site.pp b/manifests/site.pp index 818cd21..f445ffc 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1,43 +1,44 @@ define apache::site( - $ensure = present, - $docroot = false, - $redirect = false, - $redirect_match = false, - $protocol = 'http', - $aliases = false, - $server_alias = false, - $use = false, - $ticket = false, - $source = false, - $template = 'apache/site.erb', - $filename = '', - $manage_docroot = true, - $owner = 'root', - $group = 'root', - $mpm = true, - $mpm_user = '', - $mpm_group = '', - $password = '*', - $comment = '', - $sshkey = absent, - $sshkey_options = [], - $groups = '', - $shell = '/bin/false', - $manage_user = true, - $ssl = false, - $ssl_manage_cert = false, - $listen = '*', - $https_redirect = false, - $canonical = false, - $canonical_exceptions = '', - $custom_log_format = 'anon', - $hidden_service = false, - $error_log = false, - $custom_log = false, - $custom_directives = false, - $allow_override = false, - $hosting_domain = hiera('apache::site::domain', $::domain), - $certbot = false, + $ensure = present, + $docroot = false, + $redirect = false, + $redirect_match = false, + $protocol = 'http', + $aliases = false, + $server_alias = false, + $use = false, + $ticket = false, + $source = false, + $template = 'apache/site.erb', + $filename = '', + $manage_docroot = true, + $owner = 'root', + $group = 'root', + $mpm = true, + $mpm_user = '', + $mpm_group = '', + $password = '*', + $comment = '', + $sshkey = absent, + $sshkey_options = [], + $groups = '', + $shell = '/bin/false', + $manage_user = true, + $ssl = false, + $ssl_manage_cert = false, + $listen = '*', + $https_redirect = false, + $canonical = false, + $canonical_exceptions = '', + $custom_log_format = 'anon', + $hidden_service = false, + $hidden_service_version = 2, + $error_log = false, + $custom_log = false, + $custom_directives = false, + $allow_override = false, + $hosting_domain = hiera('apache::site::domain', $::domain), + $certbot = false, ) { $vhost = $filename ? { '' => "${name}", @@ -57,6 +58,7 @@ define apache::site( $hidden_enabled = hiera('apache::site::hidden', false) if $hidden_service == true and $hidden_enabled == true { tor::daemon::hidden_service { "${name}": + version => $hidden_service_version, ports => [ "80 127.0.0.1:${apache::http_port}" ], data_dir => "${tor::daemon::data_dir}/hidden", require => File["${tor::daemon::data_dir}/hidden"], -- cgit v1.2.3