At the moment I use:
object Host "usv1.domain.tld" {
vars.loc = "sr1rack1_v"
...
}
and this works very well for me:
curl ... -H 'X-HTTP-Method-Override: GET' -X POST 'https://localhost:5665/v1/objects/hosts' -d '{ "attrs": [ "__name" ], "filter": "host.vars.loc == \"sr1rack1_v\"" }'''
But now I would like to use a dictionary
object Host "usv1.domain.tld" {
vars.locating = { "level" = "Kellergeschoss","room" = "Serverraum1","position" = "Rack1" }
...
}
Iam look now for a filter expression which looks into the dictionary:
a) how could I get host objects with position=Rack1
b) how could I get host objects with several conditions like: level=Kellergeschoss && room=Serverraum1
Thank you in advance