TerryHowe / ansible-modules-hashivault

Ansible module for Hashicorp Vault.
https://pypi.python.org/pypi/ansible-modules-hashivault
MIT License
454 stars 158 forks source link

Dependency on ansible>=5.0.0 #455

Open Desarc opened 11 months ago

Desarc commented 11 months ago

Is there a reason why this module depends on the ansible package, and not the ansible-core package?

https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#selecting-an-ansible-package-and-version-to-install

We don't use a lot of community modules, so ansible-core with a few selected modules is a good fit for us. But when we install this module, we get all those included community modules anyway, which actually makes things a little trickier (we have to use a custom collection path) if we want specific versions of the community modules we do use (some of which are also included in the ansible package).

pip3 install ansible-modules-hashivault
 Collecting ansible-modules-hashivault
   Downloading ansible-modules-hashivault-5.1.2.tar.gz (80 kB)
      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.1/80.1 kB 729.1 kB/s eta 0:00:00
   Preparing metadata (setup.py): started
   Preparing metadata (setup.py): finished with status 'done'
 Collecting ansible>=5.0.0 (from ansible-modules-hashivault)
   Obtaining dependency information for ansible>=5.0.0 from https://files.pythonhosted.org/packages/32/f0/f7a66e975b9edf511e7223fe8d5642b16f1147087d4acc3d1be788267b41/ansible-9.1.0-py3-none-any.whl.metadata
   Downloading ansible-9.1.0-py3-none-any.whl.metadata (7.9 kB)
 ...

This is not a huge issue for us, but I generally sleep better at night knowing my dependencies don't pull a lot of additional unnecessary dependencies along for the ride.

Edit: Also, thanks a lot for this module, it's one of our most used :)

TerryHowe commented 11 months ago

My $day_job interferes with my work here, I just don't have much time to put into this. I have no idea how much work is required to make this change, do you know? Do you want to throw up a PR if it isn't too bad?

Desarc commented 11 months ago

Unfortunately I'm not very familiar with the source code here, or with Ansible module development in general. But a first-glance guess would be that if you don't actually depend on all those community modules, simply changing the dependency in setup.py might fix it, and everything should be fine. But the burden probably lies in verifying that this is true. We could test a prerelease version in our environment, but that would probably only cover a small subset of the functionality. It looks like there is a test suite under functional, is the coverage good enough to safely make a change like this?

bendem commented 9 months ago

This was fixed in #462, awaiting release.