Changes
Page history
howto/cumin: add examples for negation and structured facts
authored
Jun 18, 2024
by
lelutin
Show whitespace changes
Inline
Side-by-side
howto/cumin.md
View page @
5ec07756
...
@@ -66,6 +66,14 @@ will run the same command only on physical hosts:
...
@@ -66,6 +66,14 @@ will run the same command only on physical hosts:
cumin 'F:virtual=physical' uptime
cumin 'F:virtual=physical' uptime
You can invert a condition by placing 'not ' in front of it. Also for facts,
you can retrieve structured facts using puppet's dot notation (e.g.
'networking.fqdn' to check the fqdn fact). Using these two techniques the
following example will run a command on all hosts that have not yet been
upgraded to bookworm:
cumin 'not F:os.distro.codename=bookworm' uptime
Just check the monitoring server:
Just check the monitoring server:
cumin 'R:class=roles::monitoring' uptime
cumin 'R:class=roles::monitoring' uptime
...
...
...
...