Adrian
03/04/2026, 10:59 PMnode "foo" {
$foo = true
}
Then any class in the catalog can refer to whether or not this variable is true by using
if getvar('foo') {
...
}
Normally I don't like global, or in this case node scope, variables, but this does seem to fit with what the docs suggest node scope should be used for
> Although node definitions can contain almost any Puppet code, we recommend that you use them only to set variables and declare classes. Avoid putting resource declarations, collectors, conditional statements, chaining relationships, and functions in node definitions; all of these belong in classes or defined types.
Are there any pitfalls or reasons to not do this?