Closed PierreR closed 5 years ago
As the added test shows, this issue is not about 'facts'. Anything above 2 levels will fail:
notify {"${os['release']['major']}":}
I believe the issue is on the parser:
> parseTest interpolableString "\"${os['architecture']}\""
[Lookup (Terminal (UVariableReference "os")) (Terminal (UString "architecture"))]
> parseTest interpolableString "\"${os['release']['major']}\""
[Lookup (Lookup (Terminal (UString "os")) (Terminal (UString "release"))) (Terminal (UString "major"))]
@bartavelle I guess there is a better way to fix this than using makeExprParser
?
The first notify works without problem and display the expected value 'RedHat'. The second fails with
Given the os facts is defined as in tests/default.yaml :
PS: this issue exist in previous releases such as
v3.20.1