I'd like to use template()
to concatenate some files. I read this question, which is fine if you know exactly how many files you want to concat. What if I just have an array of input file names?
$files = ['mymod/a.erb', 'mymod/b.erb', 'mymod/c.erb']
file { "/var/foo/final":
content => template ($files) # <-- error, can't convert Array to String
}
I'd like to avoid having to write a parser function.