Don' On Tue, Feb 22, 2022 at 3:46 PM Dick Visser <[email protected]> wrote: > > Hi > > I'm setting out to upgrade ansible in some places here. > We exclusively use ansible in dedicated venvs, using python3.9. > Most of the installs are 3.4.0. > Looking back over the last years I had the impression that doing 'pip install > ansible' was increasingly slower. > This makes sense as there is increasingly more to it. I just a quick test and > indeed it's been growing a lot: > > 153M 2.9.27 > 368M 2.10.7 > 402M 3.4.0 > 488M 4.10.0 > 508M 5.3.0
"pip install ansible" is now outrageously large. Most ansible servers use only a srlect few, if they use any at all, out of the list of nearly 100 ansible collection modules, aka "ansible galaxy" modules, and those are safer and more reliably installed individually on an as needed basis with the "ansible galaxy" command. At this point, I suggest that it be called "ansible_collections", and if anyone still wants "pip install ansible" to work the same way, that should be set as tiny dependency wrapper for ansible-core and for the more consistently named ansible_collections. For you, right now, rip out the "ansible" package, install only "ansible-core" which actually contains all the ansible scripts and the "ansible.*" python modules. "ansible" does not contain "ansible-core" at all, it only lists a dependency on it and pulls in an installation of ansible-core. > Since we only use a fraction of these, I would like to have only those > installed. I doubt you use more than 3. Maybe the posix module? > I couldn't find any clean way of uninstalling collections from > lib/python3.9/site-packages/ansible_collections. "pip3 uninstall ansible" is a good start. Use "ansible galaxy" if and only as needed. It's vastly simpler for most of us to keep a small set of third party modules tested and coherently deployed than an agglomeration of 100 third party modules. I'm aware of several projects which have previously agglomerated such large software suites, into single tarballs: I used to help Akamai do that back in the day, and rolling back the suite when one little bit broke became a nightmare. So did testing the complete suite of software, rather than individual components. If you feel the need for working versions of the very large "ansible" labeled collection of ansible collections modules on a RHEL 7 or RHEL 8 system, take a look at my RPM building tools at https://github.com/nkadel/ansiblerepo/ -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAOCN9ryXUXNWOHsBVUOmYqzHjaB4-Fi11A5b7jXcm6vtF33nLQ%40mail.gmail.com.
