Giuseppe Lavagetto has submitted this change and it was merged.

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(-)

Approvals:
  Giuseppe Lavagetto: Verified; Looks good to me, approved



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: merged
Gerrit-Change-Id: I9b507132705f60c3c9f06159201d56dd620934ac
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to