Look up which environment a node is in

If you need to determine which environment a certain node is part of, look it up using the puppet node find command.

  1. To look up which environment a node is in, run puppet node find <node> on the Puppet Server host node, replacing <node> with the node's exact name.
    Alternatively, run puppet node find <node> --render_as json | jq .environment to render the output as JSON and return only the environment name.

    The node name must exactly match the name in the node's certificate, including capitalization. By default, a node's name is its fully qualified domain name, but the node's name can be changed by using the certname and node_name_value settings on the node itself.