Hello, We wanted to created a query, which would check the hostgroup fact of machines that apply a certain type of resource declared in a certain manifest file. We wanted to use the 'select-resources' subquery as follows:
curl -G -H "Accept: application/json" localhost:8080/v3/facts --data-urlencode 'query=["and",["=","name","hostgroup"], ["in","certname",["extract","certname", ["select-resources", ["and",["=", "type", "Class"],["=","file","/path/to/mymanifest.pp"]]]]]]' This returns an error: "file is not a queryable object for resources". According to the documentation, 'select-resources' takes any arguments valid for /v3/resources endpoint. If we try the arguments of 'select-resources' directly to the resources endpoint, we get valid results: curl -G -H "Accept: application/json" localhost:8080/v3/resources --data-urlencode 'query=["and",["=", "type", "Class"],["=","file"," /path/to/mymanifest.pp"]]' lists all 'Class' type resources (and properties) declared in mymanifest.pp. If we try and query the "title" property, instead of the "file" property it works fine. Did we miss something? -- 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/aebb37eb-64e5-47e7-8fad-ac734f724cef%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
