Verified Commit bd68348e authored by lelutin's avatar lelutin
Browse files

cumin: add example for matching resources and use newer 'role'-based class

The monitoring example for matching on an included class uses the legacy
`roles` module. To make this example live longer, let's get rid of the
example based on the legacy module.

There's currently no example for how we can match on the presence of a
resource type. It's useful to know that the pattern is a bit different
than how matching for classes is done.

The cumin documentation has some more examples for how to make matching
more precise by using expected parameter values on the resource types.
But we can find those out in the cumin doc. As long as we know from our
side that matching on resource types is possible.
parent 0ed1fd93
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -216,9 +216,14 @@ upgraded to bookworm:

    cumin 'not F:os.distro.codename=bookworm' uptime

Just check the monitoring server:
To run against all hosts that have an `ssl::service` resource in their latest
built catalog:

    cumin 'R:class=roles::monitoring' uptime
    cumin 'R:ssl::service' uptime

To run against only the dal ganeti cluster nodes:

    cumin 'R:class=role::ganeti::dal' uptime

Any Puppet fact or class can be queried that way. This also serves as
a ad-hoc interface to query PuppetDB for certain facts, as you don't