-
Notifications
You must be signed in to change notification settings - Fork 49
pypi.org modules for "ansible" and "ansible-core" are mislabeled #185
Comments
That is not correct. The Pypi package "ansible" has always been Ansible "with batteries included". This did not change between 2.9 (when everything was still one package) and 2.10 (when the core was moved to the ansible-base package, which was renamed to ansible-core in 2.11). ansible-core is ansible-core, and ansible is what is also called the Ansible community distribution.
This is not "unnecessary", since that's basically the batteries that have always been included as part of the Ansible package. It's only that since 2.10, it is now possible to install the "core" part of Ansible, i.e. the part "without batteries". (And yes, things are still confusing, and documentation can definitely be improved - PRs are always welcome! -, but what you are requesting is not the solution.)
If you don't want the batteries, simply install ansible-core.
ansible-core has version 2.11.5. Ansible has version 4.5.0. If you are wondering on
|
While the
From my experience, most casual Ansible users do not care about the split and this is the target population developers and community tried to protect when they designed the way forward during the core/content split. And I explained in the previous paragraph, going any other way would mean that some playbooks would start working because some of the content would be missing. More experienced Ansible users have the freedom to optimize their deployment systems in a number of ways: from installing ansible-core and then adding only required collections to building execution environments.
Again, renaming the package is not an option here because the |
I just checked. Up until at least the pypi.org published ansible 2.9.25, the "ansible" published in pypi.org differed only slightly from the git repo tags at https://github.com/ansible/ansible. Apparently, somewhere among the 2.10 builds, someone decided to replace the contents of the original "ansible" tarball with the "ansible_collection" tarball, and divorce it from the upstream github repo called "ansible", and rely on installing a new pypi module called "ansible-core" as a dependency. This is now very confusing, and even dangerous. There is no pointer to the relevant upstream git repo or provenance for the published ansible_collections tarball being used, and the documentation incorrectly points to https://github.com/ansible/ansible, all of which is now instead in the "ansible-core" module. Dozens if not hundreds of vendor published "pip install ansible" steps, including those published for Ansible tower and AWX, need to be revised to point to "pip install ansible-core" to avoid a bulky and unwelcome undle of potentially conflicting or incompatible modules which they don't need or want. If I want a 20 pound accessory kit to go with my good 1 pound electric screwdriver, I'd like the box it comes in to be labeled "powered screwdriver accessories", not to be labeled "powered screwdriver" and find a sign in it saying "go get the other box labeled powered-screwdriver-core". It's confusing, and it multiplies both the size and the installation time for "pip install ansible" by a factor of about 25. Maybe not that much increase in time, the ansible test scripts are pretty thorough. But it burns a lot of time very few people need to spend. |
I think you are missing a few pieces of information. Did you read through the https://www.ansible.com/blog/ansible-3.0.0-qa and https://www.ansible.com/blog/announcing-the-community-ansible-3.0.0-package ? Those two blog post should give you a bit more information about what is happening. But just for the sake of completeness, let me briefly summarize the situation here. When you run
So whether you like it or not, you are installing the 20 pound accessory kit (ca. 4000 modules and plugins) when you install Ansible 2.9. But things changed with the release of Ansible 2.10. When you run
The difference is that ansible/ansible repository only contains things listed under 1 and 2 (those are packaged as the
This is correct. Up until Ansible 2.10, tags in ansible/ansible repo and releases of the
This is also true, but you are missing one important fact here: during the 2.10 development cycle, the ansible/ansible repo lost almost all modules that were previously part of that repo. During that time, the number of plugins and modules that were part of ansible/ansible dropped from cca. 4000 to a few tens (to what is listed in https://docs.ansible.com/ansible/latest/collections/ansible/builtin/index.html).
There is no upstream repo for the
As Felix said before, there are still issues with the docs, and contributions/clarifications are more than welcome.
This is not true. If they used Ansible 2.9 before, the only safe option for them is to keep using the
I have a feeling that you are thinking about Ansible 2.9 as a "powered scredriver" while it was always a "powered screwdriver and accessories and kitchen sinks" thing. Ansible Core is what one would call "powered scredriver", but this did not exist in the Ansible 2.9 world. |
The ansible-2.9 world consisted mainly of the "powered screwdriver", by line count and by number of files. Whether or not folks have come to expect that "kitchen sink", they don't really need the kiddie pool, the Olympic diving board, David Hasslehoff as a life guard, and a golden retriever to collect ducks in hunting season. Most of the rest of the ansible_collection is unnecessary and would be unwelcome for most installations, especially since it now has 140 distinct license files embedded in it. Without getting into the wisdom and instability of creating such large bundles of disparate software, I'll suggest that it should be segregated. Move it aside to an "ansible_collections" module. If the pypi "ansible" module needs to remain linked to these other components, then make "ansible" just require "ansible-core" and "ansible_collections", to better manage the resources and make more clear that "ansible-core" has the vital components, the others are add-ons. I'd be happy to help do this if I can. I mostly work with RPM packaging of python modules, which is why I noticed this, and have published roughly 500 such SRPMs. |
The number of lines did grow substantially during the 2.10 development cycle. The main reasons for this growth are:
I did some measuring in order to quantify the effects the split had on the Ansible installation size and these are the results I got:
If we remove the size increases due to reasons 1 and 2, the size of Ansible 2.10.7 decreases to 11 MB for core and 130 MB for collections, bringing its total size down to 141 MB. This means that Ansible grew less during the 2.10 development cycle compared to the 2.9 development cycle. There is not much we can do about the tests being included until we hear back from the legal, but preserving the symlinks is definitely something we can do. And if you would be willing to help us here, that would be great.
I am not sure what are you trying to say here. Ansible package way growing fast even before the content was split into individual collections. In fact, this was one of the main reasons why it was split in the first place. So all those "unnecessary" things were always part of Ansible and are not something that we started adding after the Ansible was split. I hope the size increase between Ansible 2.8 and 2.9 makes this clear. As for the licenses, there are quite a few of them used in the package, but they are all GPLv3 compatible and the package itself is released under GPLv3.
The Ansible PyPI package must remain in place for the backward compatibility reasons I mentioned a few times already. So this package is not going anywhere anytime soon. If it were up to me to decide if the community package lives or not, Ansible 2.9 would be the last version of the batteries-included package. And in my ideal world, people would only use ansible-core plus those few collections that they really need. But the reality is quite different. Lots of people use all-in-one package because it is convenient and because they were always doing things this way. And judging by the number of inclusion requests (https://github.com/ansible-collections/ansible-inclusion/discussions), collection authors also feel that being included in a common package is beneficial to the user. Making Ansible package a "virtual" package that exists just to pull certain dependencies would introduce more administrative work for very little benefit. Since both packages would need to be updated at the same time and their versions kept in sync, it makes no sense to go in that direction. |
I thought the "David Hasslehoff as a lifeguard" metaphor was pretty clear. I won't take on trying to talk collection authors out of default inclusion, though I think it's a horrible, horrible idea. I've worked in environments that believed in the "monolithic, guaranteed to work" tarball. The question isn't whether it will break down, the question is when. I suspect it is when different sub "collections" are compatible only with distinct versions of ansible-core, or even different versions of python 3. I'm not in a position to insist on changing this layout, but I do think that migrating ansible_collections away from the "ansible" module itself would help clarify the layout. Having the "ansible" python module install its python components to the "ansible_collections" folder is unwelcome confusion. There are a number of python modules with different directory names than their module names, and it just confuses people. |
There is not much we can do about the naming. The core team controls the engine part naming (when you install the And I hope I also explained why renaming the So as things stand, there is not much we can actually do or makes sense doing apart from educating users. I will be the first one to admit that the situation is not ideal, but it is what it is. And I have a feeling that renaming the packages will not resolve any issues since people who do not like the all-in-one package can opt to start using the |
Closing since the naming is intentional. |
SUMMARY
The pypi.org published module for "ansible" is no longer ansible. It contains dozens of modules from the ansible-collections, bundled in a single release tarball. It lists a dependency on the "ansible-core" module, which is itself the original ansible software, but in a separately mislabeled tarball. What was in the old "ansible" module has been relabeled as an "ansible-core" module.
This causes and will continue to cause confusion for python users who run "pip install ansible" and get both ansible and the bulky and unnecessary "ansible-collections" bundle. The resulting ansible-collections is roughly 4 MByte compressed, and generates a 2.5 MByte RPM, all of which is not necessary and should not be welcome part of the default ansible installation.
Segregating it to an "ansible-collections" python module would be reasonable, and workable. Reverting the python module names and numbers will require caution: the "ansible" module is now labeled as version 4.5.0, even though the real "ansible" source code's most recent version is 2.11.5. It's very confusing.
ISSUE TYPE
The text was updated successfully, but these errors were encountered: