Ask Your Question

puppet command in custom function

asked 2016-01-18 05:14:07 -0600

I would like to run a puppet command such as "puppet --version" as a custom function and use the command output in the module. Unfortunately it looks like every other command on the system works properly except for "puppet" and even when using the full path of the puppet executable the command still does not work.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-02-07 18:58:17 -0600

Henrik Lindberg gravatar image

You can use $serverfacts['serverversion'] to get the puppet version of the server, and $facts['clientversion'] to get the version of the cliet (i.e. the agent). There is no need trying to do that by running "puppet --version" in a function.

See the documentation( for more details about $server_facts, and $facts as well as what is available in different versions of puppet.

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

1 follower


Asked: 2016-01-18 05:14:07 -0600

Seen: 64 times

Last updated: Jan 18 '16