summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-05-25 11:29:26 -0300
committerSilvio Rhatto <rhatto@riseup.net>2012-05-25 11:29:26 -0300
commit569234157b6ded84ccb0c425dc07b26079b7229a (patch)
tree8d58f7761accdc237e17210e9823cc4a9df22876
parentb9aa3c0d2d3cc594f57a6a02828f11c650657b3a (diff)
downloadpuppet-apache-569234157b6ded84ccb0c425dc07b26079b7229a.tar.gz
puppet-apache-569234157b6ded84ccb0c425dc07b26079b7229a.tar.bz2
Adding tor hidden service support
-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]) {