How do I read a local (agent) file using ERB/templates?
I want to make a template that can read the local /etc/passwd file. I can only get the template to read from the files on the master, or pass it a file resource. I need this template to be dynamic based on the clients configuration.
Any of the erb code that works on file paths, ends up reading from the puppet master, not the agent/client. So forget using any standard File.open() family of ruby classes.
I can not use puppet variables or file resources, because the data is unique to the local client/agent. So forget about ... (more)