File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,6 +107,19 @@ This is useful if you want to get a list of nodes with a specific profile or rol
107107puppet query ' nodes[certname] {resources {type = "Class" and title = "CapitalizedClassname"}}'
108108```
109109
110+ ### Get all nodes that have a specific class using a specific parameter value
111+
112+ This query expands on the previous example but filters the results even more by
113+ requiring the required class to have one of its parameters be set to a
114+ predetermined value. For example, to obtain all nodes using a specific profile
115+ with a specific cluster name. Note how ` parameters ` is a field of the resources
116+ endpoint, but since it's a hash we need to use the dot-notation for accessing
117+ sub-elements.
118+
119+ ``` shell
120+ puppet query ' nodes[certname] {resources {type = "Class" and title = "CapitalizedClassname" and parameters.cluster_name = "ClusterName"}}'
121+ ```
122+
110123### Get a list of all roles / profiles
111124
112125``` shell
You can’t perform that action at this time.
0 commit comments