Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
PUP 4.3.2
-
None
-
None
-
1
-
Language 2016-03-09, Language 2016-03-23
-
Bug Fix
-
Lookup of hiera defined data in environments and modules did not to perform interpolation in nested arrays and hashes, instead the strings containing the interpolation instructions were returned as is. This has now been corrected.
Description
I haven't found duplicate reports of this.
YAML Sample:
---
|
somevar:
|
- 1
|
- 2
|
- 3
|
|
foobar: "%{alias('somevar')}"
|
|
foobar_array:
|
- "%{alias('somevar')}"
|
|
foobar_hash:
|
subkey: "%{alias('somevar')}"
|
|
foobar_hash_hash:
|
subkey:
|
subkey: "%{alias('somevar')}"
|
Result of the sample put into Global Hiera
for f in somevar foobar foobar_array foobar_hash foobar_hash_hash; do echo $f; puppet lookup $f --node puppet.example.com; done
|
somevar
|
---
|
- 1
|
- 2
|
- 3
|
foobar
|
---
|
- 1
|
- 2
|
- 3
|
foobar_array
|
---
|
- - 1
|
- 2
|
- 3
|
foobar_hash
|
---
|
subkey:
|
- 1
|
- 2
|
- 3
|
foobar_hash_hash
|
---
|
subkey:
|
subkey:
|
- 1
|
- 2
|
- 3
|
Result put into Environment Hiera
for f in somevar foobar foobar_array foobar_hash foobar_hash_hash; do echo $f; puppet lookup $f --node puppet.example.com; done
|
somevar
|
---
|
- 1
|
- 2
|
- 3
|
foobar
|
---
|
- 1
|
- 2
|
- 3
|
foobar_array
|
---
|
- "%{alias('somevar')}"
|
foobar_hash
|
---
|
subkey: "%{alias('somevar')}"
|
foobar_hash_hash
|
---
|
subkey:
|
subkey: "%{alias('somevar')}"
|
Obviously, the behavior should be maintained.