Let's say I have a parameter with a default value, like
class example (
$param = $name ? {/foo/ => "foo", default => "bar"},
)
If I don't override this parameter in my ENC (in my case, in foreman), everything happens as expected : the "$param" value depends on the value of "$name", and is either "foo" or "bar".
But if the value is overrided in the ENC with the same kind of thing, it seems that it's not interpreted (evaluated); for example, if I set it to "$name"; my ENC is :
---
classes:
example:
param: $name
[...]
(Note that the value is not quoted) and when I print the value of "param" in a file, it puts "$name" (not the value of name, just "$name", as in the ENC, without quotes).
I understand why the devs wanted this to not work; most of the time, if we override something, it is to set a constant. But in my case, it will be verty handy if it was possible to force the computation of the value from ENC, just like with default value.
PS: I would be interested even if I have to modify puppet code a little bit;
↧