summaryrefslogtreecommitdiff
path: root/puppet/modules/site_tor/manifests/init.pp
diff options
context:
space:
mode:
authorMicah Anderson <micah@leap.se>2014-04-22 14:13:46 -0400
committerMicah Anderson <micah@leap.se>2014-04-22 14:13:46 -0400
commit327d5c934e408f90011d7949b89ab01fed88998e (patch)
tree77cfefffc8f9ffe160c4413b26dd5ca5cdd6f1e8 /puppet/modules/site_tor/manifests/init.pp
parentca11482dd7cd4ea8ffa69407ee2fd5b5e1b7981b (diff)
parent4295f334ea4f92d7fb47f7121a42633630c368d1 (diff)
Merge branch 'develop' (0.5.0)
Conflicts: .gitignore Change-Id: I778f3e1f1f4832f5894bc149ead67e9a4becf304
Diffstat (limited to 'puppet/modules/site_tor/manifests/init.pp')
-rw-r--r--puppet/modules/site_tor/manifests/init.pp20
1 files changed, 13 insertions, 7 deletions
diff --git a/puppet/modules/site_tor/manifests/init.pp b/puppet/modules/site_tor/manifests/init.pp
index 50ab636b..02368a0e 100644
--- a/puppet/modules/site_tor/manifests/init.pp
+++ b/puppet/modules/site_tor/manifests/init.pp
@@ -1,11 +1,12 @@
class site_tor {
tag 'leap_service'
+ Class['site_config::default'] -> Class['site_tor']
$tor = hiera('tor')
$bandwidth_rate = $tor['bandwidth_rate']
$tor_type = $tor['type']
$nickname = $tor['nickname']
- $contact_email = $tor['contacts']
+ $contact_emails = join($tor['contacts'],', ')
$address = hiera('ip_address')
@@ -13,17 +14,22 @@ class site_tor {
tor::daemon::relay { $nickname:
port => 9001,
address => $address,
- contact_info => $contact_email,
+ contact_info => obfuscate_email($contact_emails),
bandwidth_rate => $bandwidth_rate,
my_family => '$2A431444756B0E7228A7918C85A8DACFF7E3B050',
}
- tor::daemon::directory { $::hostname: port => 80 }
-
- include site_shorewall::tor
-
- if ( $tor_type != 'exit' ) {
+ if ( $tor_type == 'exit'){
+ tor::daemon::directory { $::hostname: port => 80 }
+ }
+ else {
+ tor::daemon::directory { $::hostname:
+ port => 80,
+ port_front_page => '';
+ }
include site_tor::disable_exit
}
+ include site_shorewall::tor
+
}