Since dashboard only handles string, the only way I can think of is to
represent the array/hash data as yaml or json in dashboard and convert
the string back using a puppet function such as parsejson/parseyaml in
stdlib. At the moment, there's also additional escape characters
that's needs to be dealt with (a bug I think), so "[\"foo\"]" is
returned as "[\\\"foo\\\"]".
Thanks,
Nan
Actually, I've mistakenly filed it as a bug. If you use json, you can
parse the parameter via parsejson available in stdlib:
In dashboard set the parameter example to ["foo", "bar"]
ENC output:
parameters:
example: "[\"foo\", \"bar\"]"
In puppet manifests:
$example_array = parsejson($example)
notify { $example_array : }
notice: /Stage[main]//Node[sample]/Notify[bar]/message: current_value
absent, should be bar (noop)
notice: /Stage[main]//Node[sample]/Notify[foo]/message: current_value
absent, should be foo (noop)
Thanks,
Nan
I am actually interested in this... what is the actual status?
I would like to be able to have arrays and define them in the dashboard,
possibly filling parts of the array from different groups. Is it possible? How?
Thanks!
BR/Pablo