diff options
author | Micah <micah@leap.se> | 2016-06-28 21:56:31 -0400 |
---|---|---|
committer | Micah <micah@leap.se> | 2016-08-25 15:13:44 -0400 |
commit | d3807847b78c9441f2089cb383f2e74a612108e4 (patch) | |
tree | 831bc6e79a1d0a28ac1f2665b3ea50f0efe3a7fd | |
parent | fc78e094919257f523707ec02d897505d7107699 (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
-rw-r--r-- | puppet/modules/site_static/manifests/init.pp | 5 |
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 } |