The `file` resource type supports the `source` attribute. This can be used to pull files from Puppet file server mount points. I.e. I could specify `puppet:///mymount/folder/file.ext` and the file resource will create a file using that file as a resource.
However what I want to do is read the contents of that file into a variable.
The `file` function supports reading of files into a variable, but only out of modules it seems, and not out of file server mount points.
Is there a way to add the `source` attribute to my own module or function and leverage Puppet's existing code for doing this?
Thanks in advance.
↧