Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency on ansible>=5.0.0 #455

Open
Desarc opened this issue Dec 11, 2023 · 3 comments
Open

Dependency on ansible>=5.0.0 #455

Desarc opened this issue Dec 11, 2023 · 3 comments

Comments

@Desarc
Copy link

Desarc commented Dec 11, 2023

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
Copy link
Owner

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
Copy link
Author

Desarc commented Dec 12, 2023

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
Copy link
Contributor

bendem commented Feb 6, 2024

This was fixed in #462, awaiting release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants