summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp12
1 files changed, 11 insertions, 1 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 9e9f43f..669dd00 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -191,7 +191,7 @@ class apache {
$comment = '', $sshkey = absent,
$groups = '', $shell = '/bin/false', $manage_user = true,
$ssl = false, $listen = '*', $https_redirect = false,
- $canonical = false, $canonical_exceptions = '') {
+ $canonical = false, $canonical_exceptions = '', $hidden_service = false) {
$vhost = $filename ? {
'' => "$title",
@@ -213,6 +213,16 @@ class apache {
default => $mpm_group,
}
+ if $hidden_service == true {
+ # It's important to use a subdir from the tor datadir
+ # to ease backup/restore procedures as we don't mix
+ # hidden service data with other tor files.
+ tor::daemon::hidden_service { $title:
+ ports => "80 127.0.0.1:80",
+ data_dir => "$tor::daemon::data_dir/hidden",
+ }
+ }
+
if $mpm == true and $manage_user == true and $user != 'root' {
if $ensure == present {
if !defined(Group[$gid]) {