Use local template
How can use the erb template from the puppet agent and not on the puppet master. Also can I execute a command on agent rather than on master like to get file names in directory on agent?
Agent ERBs are not supported. Because ERBs are evaluated during catalog compilation on the master, the ERB must be available on the master. Also, calling ERBs with the template() function supports environment, meaning using the call:
...may evaluate to a different template based on the environment's modulepath. In order to send any information about the agent to the master, you want to design custom facts. For example if you consider:
$ facter rubysitedir /Library/Ruby/Site/2.0.0
This is an example fact that's providing a directory location to the master in case it needs to use it when compiling a catalog. Check out http://docs.puppetlabs.com/facter/lat... for the full reference on custom facts.
Asked: 2015-03-19 14:47:36 -0500
Seen: 103 times
Last updated: Mar 25 '15