Ask Your Question

Does puppet syntax check classes that are not part of the node

asked 2016-05-11 14:09:36 -0600

rgv gravatar image


Does puppet syntax check all the classes in a module even though its not declared for any node?

Thanks, Rgv

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2016-05-11 21:57:26 -0600

DarylW gravatar image

Are you asking about 'unexecuted' code in your module directory?

If you have a bogus, faulty module, puppet will try to parse it (for custom facts, functions, etc..) but if it's not a part of the actual resource chain that your node is using, it shouldn't interfere. If it is only puppet code it shouldn't be a problem. Facter facts and functions can sometimes cause issues though.

edit flag offensive delete link more

answered 2016-05-12 01:02:06 -0600

updated 2016-05-12 01:02:53 -0600

Have a look in the code:

      files = FileList["**/*.pp"]
      files.reject! { |f| }
      files = files.exclude(*PuppetSyntax.exclude_paths)

So all *.pp files (note it checks at the level of the pp file and is not class aware) are checked, unless explicity excluded, regardless of whether or not they're actually used.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-05-11 14:09:36 -0600

Seen: 29 times

Last updated: May 12 '16