Ask Your Question

How to collect data from nodes?

asked 2013-09-30 04:46:24 -0500

deric gravatar image

I'd like to collect ip addresses from all nodes that installed my module and concat then into one string. Something like this:

$hosts = ","

How to implement it in puppet?

edit retag flag offensive close merge delete


rahul khengare gravatar imagerahul khengare ( 2013-10-01 02:08:15 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-09-30 09:05:41 -0500

GregLarkin gravatar image

Do you need to use the value of $hosts within Puppet itself, or will it be stored externally somewhere? I suggest having a look at the PuppetDB query API ( ) to retrieve resources associated with nodes.

edit flag offensive delete link more


Hi, does Puppet have an API that could be used to act as a data source so that it could feed our Configuration Management tool (

lbhopkins gravatar imagelbhopkins ( 2013-09-30 09:47:58 -0500 )edit

Puppet has a couple of APIs, and I believe what I heard at PuppetConf was they plan to consolidate them eventually. The first one is the PuppetDB API that I ...(more)

GregLarkin gravatar imageGregLarkin ( 2013-09-30 12:47:10 -0500 )edit

Thanks, it should be used in puppet module. I have a master and a few slaves. The master should have a list of all connected slaves. Is there a way ...(more)

deric gravatar imagederic ( 2013-10-09 06:50:28 -0500 )edit

Query this endpoint in the API (, and that will give you a list of a nodes using ...(more)

GregLarkin gravatar imageGregLarkin ( 2013-10-09 12:42:14 -0500 )edit

Ok, I thought that there would be some internal function to do that. Then probably parse the response with custom ruby function, right?

deric gravatar imagederic ( 2013-10-09 13:08:42 -0500 )edit

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: 2013-09-30 04:46:24 -0500

Seen: 220 times

Last updated: Sep 30 '13