Giuseppe Lavagetto has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/187312

Change subject: hiera: actively look up the role hierarchy instead of the 
standard one
......................................................................

hiera: actively look up the role hierarchy instead of the standard one

Change-Id: I9b507132705f60c3c9f06159201d56dd620934ac
Signed-off-by: Giuseppe Lavagetto <[email protected]>
---
M modules/wmflib/lib/hiera/backend/role_backend.rb
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/12/187312/1

diff --git a/modules/wmflib/lib/hiera/backend/role_backend.rb 
b/modules/wmflib/lib/hiera/backend/role_backend.rb
index 0501685..c7f46ba 100644
--- a/modules/wmflib/lib/hiera/backend/role_backend.rb
+++ b/modules/wmflib/lib/hiera/backend/role_backend.rb
@@ -120,7 +120,12 @@
         return nil unless scope.include?topscope_var
         roles = scope[topscope_var]
         return nil if roles.nil?
-        hierarchy = Config.include?:role_hierarchy ? Config[:role_hierachy] : 
nil
+        if Config.include?(:role_hierarchy)
+          hierarchy = Config[:role_hierarchy]
+        else
+          hierarchy = nil
+        end
+
         roles.keys.each do |role|
           Hiera.debug("Looking in hierarchy for role #{role}")
           answer = nil

-- 
To view, visit https://gerrit.wikimedia.org/r/187312
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9b507132705f60c3c9f06159201d56dd620934ac
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to