hiera-router 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hiera/backend/router_backend.rb +6 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43963a8b7ae64ae4df6930f042a96c9d72f41de4
|
4
|
+
data.tar.gz: a352c0f02f8e8093d1a2cb99551984ab9493c6aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 601162d82e78f61c06b6f1cc131c1621e9278992419b53d412e188e3ff9f305f6e148e24c08f4978aa7c79785f273bd4aad7d6713e8da867a13fa9ad510b0821
|
7
|
+
data.tar.gz: 90e18f7bb03116bf38a62c61918353841387dfc23a3705fb881d8270f89d03285a85e42db9189ed647df32a41449351fa0b2dbe5114528a7141716f836b02919
|
@@ -30,12 +30,17 @@ class Hiera
|
|
30
30
|
backend_config_override = backend_config['backend_key'] || backend_config[:backend_key] || backend_classname
|
31
31
|
Hiera.debug("[hiera-router] Backend class for '#{backend}' will be '#{backend_classname}'")
|
32
32
|
|
33
|
+
backend_config_override_config = Config[backend_config_override.to_sym] || Config[:router][backend_config_override.to_sym] || {}
|
33
34
|
backend_config = Config[:router].merge({
|
34
35
|
:hierarchy => Config[:hierarchy],
|
35
36
|
:backends => [backend_classname],
|
36
|
-
backend_classname.to_sym =>
|
37
|
+
backend_classname.to_sym => backend_config_override_config,
|
37
38
|
})
|
38
39
|
|
40
|
+
if backend_config_override_config[:hierarchy]
|
41
|
+
backend_config[:hierarchy] = backend_config_override_config[:hierarchy]
|
42
|
+
end
|
43
|
+
|
39
44
|
Config.load(backend_config)
|
40
45
|
require "hiera/backend/#{full_backend_classname.downcase}"
|
41
46
|
backend_inst = Hiera::Backend.const_get(full_backend_classname).new
|