summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-21 12:44:14 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-21 12:44:14 -0200
commit830632458fa1179c8f267cdc44e571cddb6cd009 (patch)
tree612147747ed69c92b9718d9b96d69980a39443f5 /manifests
parent1a01eeb13e62bd2f6cba4735cdda913946e4562d (diff)
downloadpuppet-apache-830632458fa1179c8f267cdc44e571cddb6cd009.tar.gz
puppet-apache-830632458fa1179c8f267cdc44e571cddb6cd009.tar.bz2
Updating tor hidden service handling to the new tor module
Diffstat (limited to 'manifests')
-rw-r--r--manifests/site.pp12
1 files changed, 7 insertions, 5 deletions
diff --git a/manifests/site.pp b/manifests/site.pp
index 7b83527..a1d1803 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -31,13 +31,15 @@ define apache::site($ensure = present, $docroot = false, $redirect = false,
if $hidden_service == true {
# Make sure that the tor daemon is included
- include tor::daemon
+ if !defined('::tor::daemon') {
+ class { '::tor::daemon': }
+ }
# 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.
- if !defined(File["$tor::daemon::data_dir/hidden"]) {
- file { "$tor::daemon::data_dir/hidden":
+ if !defined(File["${tor::daemon::data_dir}/hidden"]) {
+ file { "${tor::daemon::data_dir}/hidden":
ensure => directory,
owner => 'debian-tor',
group => 'debian-tor',
@@ -47,8 +49,8 @@ define apache::site($ensure = present, $docroot = false, $redirect = false,
tor::daemon::hidden_service { $title:
ports => "80 127.0.0.1:80",
- data_dir => "$tor::daemon::data_dir/hidden",
- require => File["$tor::daemon::data_dir/hidden"],
+ data_dir => "${tor::daemon::data_dir}/hidden",
+ require => File["${tor::daemon::data_dir}/hidden"],
ensure => $ensure,
}
}