Ask Your Question

Use local template

asked 2015-03-19 14:47:36 -0600

Ankush Garg gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-03-25 14:07:54 -0600

WhatsARanjit gravatar image

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

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 for the full reference on custom facts.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2015-03-19 14:47:36 -0600

Seen: 115 times

Last updated: Mar 25 '15