6

I'm looking for a way to display a notify { ... } message during puppet client run only when using

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

I'd like to display debug messages when interactively/manually running puppet on clients. Yet, I couldn't find a way to evaluate these switches in my puppet manifests. How could I achieve this for puppet 4.x?

ITL
  • 422
  • 1
  • 5
  • 17

1 Answers1

6

All Puppet resources support the loglevel metaparameter, including notify. Set it to debug to make a resource report on that level.

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

Output from such resources is hidden by default.

The verbose option does not imply a specific log level.

Felix Frank
  • 8,125
  • 1
  • 23
  • 30