Abhi,
Try this:
curl -X GET http://localhost:8080/v4/facts/ipaddress --data-urlencode
'query=["in","certname",["extract","certname",["select-nodes",["=",["fact","kernel"],"Linux"]]]]
Wyatt
On 12/11/14 12:14 PM, a...@littlewiki.in wrote:
Hello.
I want to get the ip-addresses of all Linux machines. Here's my query
using curl
query=["=", "name", "ipaddress"],["in", "certname",["extract",
"certname", ["select-nodes",["and",["=", "name", "kernel"],["=",
"value", "Linux"]]]]]
This returns me the ipaddresses of all the machines. If I add an and
condition to the two blocks, it returns a query malformed error.
Essentially, I want to get nodes that match factA=B and factC=D and
return factX. and factY of each matched node.
How do I go about doing this?
--
Abhi
--
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 puppet-users+unsubscr...@googlegroups.com
<mailto:puppet-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/8fd9d60b-4e25-4e25-8c98-7559bec45ba4%40googlegroups.com
<https://groups.google.com/d/msgid/puppet-users/8fd9d60b-4e25-4e25-8c98-7559bec45ba4%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/548A3198.8030901%40puppetlabs.com.
For more options, visit https://groups.google.com/d/optout.