PuppetDB version- 5.2
I want to retrieve list of servers with a specific role- tata_umg
The json is in below format:
[
{
"certname":"<hostname>",
"environment":"xxxx",
"name":"xxxx_clientname",
"value":{
"clientabc":{
"xxxx_productname":{
"tata":{
"xxxx_instanceid":"0",
"xxxx_serverrole":[
"tata_umg"
]
}
}
}
}
}]
Can use below 2 get requests to reterive:
curl -X GET
'http://puppetdb.aws.internal:8080/pdb/query/v4/facts/xxxx_clientname'
curl -X GET 'http://puppetdb.aws.internal:8080/pdb/query/v4/facts'
--data-urlencode 'query=["=", "name", "xxxx_clientname"]'
But this gives me a json with all server's - 'xxxx_clientname' and not
specific to a certain role.
Can anyone please help me update the query to make it work as per my need.
--
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/8d2e4bc6-762e-4349-ac28-e20d587d36df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.