summaryrefslogtreecommitdiff
path: root/puppet/modules/site_webapp
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2017-09-19 11:54:27 -0700
committerMicah Anderson <micah@riseup.net>2017-10-05 19:24:34 -0400
commit96f8af37b4a3bbd9a15651e27f588073c0601299 (patch)
tree9f2883b1aa100861bfd8d80c6d645d65d3a5e492 /puppet/modules/site_webapp
parent18db08c95b0de9cf1ad511fa1dbb20f5eda8bbac (diff)
Feat: split tor service into three
The 'tor' service is now three separate services, 'tor_exit', 'tor_relay', or 'hidden_service'.
Diffstat (limited to 'puppet/modules/site_webapp')
-rw-r--r--puppet/modules/site_webapp/manifests/hidden_service.pp4
-rw-r--r--puppet/modules/site_webapp/manifests/init.pp6
2 files changed, 4 insertions, 6 deletions
diff --git a/puppet/modules/site_webapp/manifests/hidden_service.pp b/puppet/modules/site_webapp/manifests/hidden_service.pp
index 3f3f1d0c..658d62f9 100644
--- a/puppet/modules/site_webapp/manifests/hidden_service.pp
+++ b/puppet/modules/site_webapp/manifests/hidden_service.pp
@@ -2,7 +2,7 @@
class site_webapp::hidden_service {
$tor = hiera('tor')
$hidden_service = $tor['hidden_service']
- $tor_domain = "${hidden_service['address']}.onion"
+ $onion_domain = "${hidden_service['address']}.onion"
include site_apache::common
include apache::module::headers
@@ -33,7 +33,7 @@ class site_webapp::hidden_service {
'/var/lib/tor/webapp/hostname':
ensure => present,
- content => "${tor_domain}\n",
+ content => "${onion_domain}\n",
owner => 'debian-tor',
group => 'debian-tor',
mode => '0600',
diff --git a/puppet/modules/site_webapp/manifests/init.pp b/puppet/modules/site_webapp/manifests/init.pp
index deb8e8c8..968859bf 100644
--- a/puppet/modules/site_webapp/manifests/init.pp
+++ b/puppet/modules/site_webapp/manifests/init.pp
@@ -177,11 +177,9 @@ class site_webapp {
notify => Service['apache'];
}
- if $tor {
+ if $tor and member($services, 'hidden_service') {
$hidden_service = $tor['hidden_service']
- if $hidden_service['active'] {
- include ::site_webapp::hidden_service
- }
+ include ::site_webapp::hidden_service
}