summaryrefslogtreecommitdiff
path: root/puppet
diff options
context:
space:
mode:
authorMicah <micah@leap.se>2016-06-28 21:56:31 -0400
committerMicah <micah@leap.se>2016-06-28 21:58:01 -0400
commit8e0fdbb46761505b9188c9ea2a6c0df0c55ac458 (patch)
tree684b3c38d4603cb76ed2ad3a27de0ac56c36090e /puppet
parent459e2e302378103f9ddbb4f4bde0b2133656ba06 (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')
-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 4912fbab..0acfc223 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"
file {
'/srv/static/':
@@ -75,6 +72,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
}