Forked from tuxfight3r/gist:9056eb0862fdf2e8b8755b3c6ce40af1
Created
November 1, 2021 02:20
-
-
Save tutelacooldouce/9020bf0798cc1ccb482715529c9eb902 to your computer and use it in GitHub Desktop.
Revisions
-
renaudhager revised this gist
Aug 30, 2016 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,9 @@ curl -s -X GET http://localhost:8080/pdb/query/v4/facts --data-urlencode query@test --data-urlencode 'pretty=true' curl -X POST http://localhost:8080/pdb/query/v4/facts \ -H 'Content-Type:application/json' \ -d '{"query":["and",["=","certname","FQDN"],["=","name","ipaddress"]]}' content of file test : ["and",["=","certname","FQDN"],["or",["=","name","ipaddress"]]] -
renaudhager revised this gist
Aug 30, 2016 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,11 @@ curl -s -X GET http://localhost:8080/pdb/query/v4/facts --data-urlencode query@test --data-urlencode 'pretty=true' content of file test : ["and",["=","certname","FQDN"],["or",["=","name","ipaddress"]]] ["and",["=","certname","FQDN"],["=","name","ipaddress"]] ["and", ["=", "name", "bios_version"], ["in", "certname", -
renaudhager revised this gist
Aug 25, 2016 . 1 changed file with 14 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,4 +35,17 @@ Query with mutliple fact with OR : ["or", ["=", ["fact", "s_role"], "role1"], ["=", ["fact", "s_role"], "role2"], ["=", ["fact", "s_role"], "role3"]]]]]] Query with mutliple fact with OR and AND: ["and", ["=", "name", "hostname"], ["in", "certname", ["extract", "certname", ["select_facts", ["and", ["=", ["fact", "s_datacenter"], "mydc"], ["or", ["=", ["fact", "s_role"], "role1"], ["=", ["fact", "s_role"], "role2"], ["=", ["fact", "s_role"], "role3"]]]]]]] -
renaudhager revised this gist
Aug 25, 2016 . No changes.There are no files selected for viewing
-
renaudhager revised this gist
Aug 25, 2016 . 1 changed file with 3 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,8 +33,6 @@ Query with mutliple fact with OR : ["in", "certname", ["extract", "certname", ["select_facts", ["or", ["=", ["fact", "s_role"], "role1"], ["=", ["fact", "s_role"], "role2"], ["=", ["fact", "s_role"], "role3"]]]]]] -
renaudhager revised this gist
Aug 25, 2016 . 1 changed file with 13 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,4 +25,16 @@ Request 2 facts : [ "or", ["=", "name", "ipaddress"], ["=", "name", "operatingsystem"] ] Query with mutliple fact with OR : ["and", ["=", "name", "hostname"], ["in", "certname", ["extract", "certname", ["select_facts", ["or", ["=", ["fact", "s_role"], "fe"], ["=", ["fact", "s_role"], "fo"], ["=", ["fact", "s_role"], "fo2"], ["=", ["fact", "s_role"], "be"], ["=", ["fact", "s_role"], "parser"]]]]]] -
renaudhager revised this gist
Aug 25, 2016 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,4 +19,10 @@ To get hostname in fact : ["and", ["=", "name", "hostname"], ["in", "certname", ["extract", "certname", ["select_facts", ["=", ["fact", "hostname"], "myhostname"] ]]]] Request 2 facts : [ "or", ["=", "name", "ipaddress"], ["=", "name", "operatingsystem"] ] -
renaudhager revised this gist
Jul 15, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,4 +19,4 @@ To get hostname in fact : ["and", ["=", "name", "hostname"], ["in", "certname", ["extract", "certname", ["select_facts", ["=", ["fact", "hostname"], "myhostname"] ]]]] -
renaudhager revised this gist
Jul 15, 2016 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,4 +13,10 @@ To select all DELL model ["and", ["=", "name", "bios_version"], ["in", "certname", ["extract", "certname", ["select_facts", ["=", ["fact", "manufacturer"], "Dell Inc."] ]]]] To get hostname in fact : ["and", ["=", "name", "hostname"], ["in", "certname", ["extract", "certname", ["select_facts", ["=", ["fact", "hostname"], "sci-prod-db-ma114"] ]]]] -
renaudhager revised this gist
May 17, 2016 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,4 +7,10 @@ content of file test : ["extract", "certname", ["select_facts", ["and", ["=", ["fact", "manufacturer"], "Dell Inc."], ["=", ["fact", "productname"], "PowerEdge R620"]]]]]] To select all DELL model ["and", ["=", "name", "bios_version"], ["in", "certname", ["extract", "certname", ["select_facts", ["=", ["fact", "manufacturer"], "Dell Inc."] ]]]] -
renaudhager created this gist
May 17, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ curl -s -X GET http://localhost:8080/pdb/query/v4/facts --data-urlencode query@test --data-urlencode 'pretty=true' content of file test : ["and", ["=", "name", "bios_version"], ["in", "certname", ["extract", "certname", ["select_facts", ["and", ["=", ["fact", "manufacturer"], "Dell Inc."], ["=", ["fact", "productname"], "PowerEdge R620"]]]]]]