Puppet notify resource converts the array to a string. It's not that
the variable isn't an array, but you are looking at the .to_s output.
The following example should demonstrate this better:
var = [1, 2]
notice("user-${var}")
$arr = inline_template("<%= var.inspect %>")
notice("user-${arr}")
notice: Scope(Class[main]): user-12
notice: Scope(Class[main]): user-["1", "2"]
notice: Finished catalog run in 0.04 seconds
A common misconception, but most people expect in puppet string+array
results in an array value with the string prefix every array element,
what you get is actually string + array.to_s. I haven't seen the
cookbook recipe, but I think what you meant is something closer to
this:
https://gist.github.com/7860c7d8c157432381e3
The crazy parsejson (from stdlib) inline_template is just getting
around inline_template returning string. That should be rewritten as a
puppet function. Anyhow the manifests should give an idea what you are
trying to do.
Nan