puppetlabs-apache icon indicating copy to clipboard operation
puppetlabs-apache copied to clipboard

Detect module dependencies when modules are not default-loaded

Open gcoxmoz opened this issue 6 months ago • 2 comments

Additional Context

If you accept default_mods => true you get a -lot- of apache modules automatically. In my experience it's too many, which has led to us doing default_mods => [] to reduce the sprawl, and then adding back in what we need. That leads to a bit of whack-a-mole upon new server buildout, as a lot of this module's code assumes that you have included the default modules and it doesn't need to check. It also leads to "I'm not sure if I can remove this module" later, if you remove directives.

Summary

This covers off the worst offenders I've hit in our environment: mod_dir, mod_autoindex, mod_expires, mod_dav, and mod_cgi. If you use vhost directory parameters that will invoke these module directives, vhost will try to make sure the module is loaded. If you're on default_mods => true, this is a 'wasted' extra load; if you don't have the module loaded (say, default_mods => false) then this brings the module in for you.

Related Issues (if any)

N/A

Checklist

  • [x] 🟢 Spec tests.
  • [ ] 🟢 Acceptance tests.
  • [x] Manually verified. (For example puppet apply)

gcoxmoz avatar Apr 04 '25 01:04 gcoxmoz