On Tuesday, 20 January 2015 20:00:14 UTC, JonY wrote:

I'm hoping to use this library (or something similar) to request a single 
> fact from all nodes. The equiv curl request would be 'curl -X GET 
> http://host:8080/v3/facts --data-urlencode 
> 'query=["=","name","fs_space"]'.
>
> I've been looking at the docs on '
> https://github.com/puppetlabs/puppetdb-ruby' but I can't seem to get the 
> syntax correct for this type of request. Suggestions?
>


It'll look like this:

response = client.request(
  'facts',
  [:'=', 'name', 'fs_space']
)

nodes = response.data 


The response data will be an array of hashes - each hash containing the 
node's "certname" and the "name" and "value" of its fact.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b35a4b18-99a8-4d83-be23-15e128201dc3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to