1
votes

My context:

  • I'm including a module which in turn includes more modules
  • when I run a "puppet apply" the first included module runs fine...
  • until it gets to the "include" statement for the other module
  • the mechanism I'm using to include modules is nonstandard and is part of the infrastructure I'm working in. Usually I could just check a directory and see if the module is there... but since there is "magic" involved in including modules, I have to debug during the apply.

err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class missingmoduleclassname

My question:

  • I'd like to print out the available modules to stdout during the apply. Is there a way to do that?
  • I'm already using code like: notify{"The list of modules available is: ${yourvar}": }
    • Is there a variable I can print out? What is it called?
2

2 Answers

0
votes

So what you want are messages that are printed during the compilation phase of puppet apply (there is also a catalog application phase, but that is not reached here because compilation fails).

There are some parser functions that allow that:

  • notice
  • warning
  • err
  • crit
  • emerg

You could add this at the top of your mymodule class body:

notice "evaluating mymodule ..."

etc. for each individual module.

0
votes

The consensus seems to be: there isn't a way to easily do this! Oh well.