|
Puppet Version: 5.3.3, 3.8.7, 2.7.26
The documentation of the file type's content attribute is: "The desired contents of a file, as a string."
However an array of strings is also accepted. When content is set to an array, the last element of the array is used as content. I don't know if this behaviour is intended, it is not documented as far as I can tell. This behaviour is not new, I tested using Puppet 5.3, 3.8, 2.7 and got the same result with all of them.
Desired Behavior: I would expect the following to result in an evaluation error due to content not being a String value:
file { '/tmp/foo':
|
content => ["a\n", "b\n", "c\n"],
|
}
|
Actual Behavior: File '/tmp/foo' is created with the content "c\n".
|