Only install specific modules from general

I only use 3 modules from community.general and would rather not install the whole collection. Is there a supported way to install specific modules?

I don’t think there is. To the best of my knowledge, it’s all or nothing.

Why don’t you want to install the complete collection? A few KB or even MB more, few less… :person_shrugging:

You could write a script that creates a copy of the collection and deletes everything that isn’t needed. What you need to watch out for are doc fragments and module utils, besides that modules don’t need anything else. But no, there’s no official way to do this.

(It shouldn’t be too hard to write a script which automates that by figuring out which doc fragments are needed and which module utils - for module utils you could take a look at Add tool to find unused module utils by felixfontein · Pull Request #151 · ansible-community/antsibull-nox · GitHub and the code it uses. But it’s likely a lot easier to create something specific for the modules you’re using, instead of writing a general tool.)