summaryrefslogtreecommitdiff
path: root/puppet/modules/site_static/manifests
diff options
context:
space:
mode:
authorMicah <micah@leap.se>2016-06-28 21:56:31 -0400
committerMicah <micah@leap.se>2016-08-25 15:13:44 -0400
commitd3807847b78c9441f2089cb383f2e74a612108e4 (patch)
tree831bc6e79a1d0a28ac1f2665b3ea50f0efe3a7fd /puppet/modules/site_static/manifests
parentfc78e094919257f523707ec02d897505d7107699 (diff)
Fix for when tor is not an array.
When tor is not configured, then its possible to get this error on deploy: Error: tor is not a hash or array when accessing it with hidden_service at /srv/leap/puppet/modules/site_static/manifests/init.pp:16 on node rewdevstatic1.rewire.org This commit only accesses the array when its enabled. Change-Id: Ia75ac7a51179da980966adba0cc614b9cd642b0c
Diffstat (limited to 'puppet/modules/site_static/manifests')
-rw-r--r--puppet/modules/site_static/manifests/init.pp5
1 files changed, 2 insertions, 3 deletions
diff --git a/puppet/modules/site_static/manifests/init.pp b/puppet/modules/site_static/manifests/init.pp
index 5b432f29..ab08f8e3 100644
--- a/puppet/modules/site_static/manifests/init.pp
+++ b/puppet/modules/site_static/manifests/init.pp
@@ -11,10 +11,7 @@ class site_static {
$domains = $static['domains']
$formats = $static['formats']
$bootstrap = $static['bootstrap_files']
-
$tor = hiera('tor', false)
- $hidden_service = $tor['hidden_service']
- $tor_domain = "${hidden_service['address']}.onion"
if $bootstrap['enabled'] {
$bootstrap_domain = $bootstrap['domain']
@@ -61,6 +58,8 @@ class site_static {
}
if $tor {
+ $hidden_service = $tor['hidden_service']
+ $tor_domain = "${hidden_service['address']}.onion"
if $hidden_service['active'] {
include site_static::hidden_service
}