This message was deleted.
# puppet-enterprise
s
This message was deleted.
b
you can also query puppetdb for all used classes and check which classes you have, and diff that. I hacked a script for that together some time ago
j
Thank you, I'll take a look at both
m
There are some caveats to checking for unused modules by looking for classes, if a module provides facts or resources for instance. using the class method STDLIB may look like a dead module, when infact its probably all over the code base
b
https://github.com/voxpupuli/puppet-catalog_diff our catggalog-differ is the perfect tool to find such problems
c
The PE Classifier has an API endpoint that will list out all classes across all environments: https://puppet.com/docs/pe/2021.7/classes_endpoint.html#classes_endpoint Could diff that against the PuppetDB output for which classes are in node catalogs.
If there are modules that only provide Defined Types, Tasks, or Plans, a method that just compares Classes will show them as "unused".
But, diffing classes could produce a list short enough that it is reasonable to review manually.