Notify only in verbose or debug mode

I am looking for a way to display the notify { ... } message notify { ... } while starting the doll client only when using

  • puppet apply <--verbose | --debug>
  • puppet agent <--verbose | --debug>

I want to display debug messages when interactively / manually launching the puppet on clients. However, I could not find a way to evaluate these switches in their manifestations of the puppet. How could I achieve this for a 4.x puppet?

+6
source share
1 answer

All Puppet resources support the loglevel metaparameter, including notify . Set debug for this parameter to report the resource at this level.

 notify { "this is a debug message": loglevel => "debug" } 

The output from such resources is hidden by default.

The verbose parameter does not imply a specific log level.

+5
source

All Articles