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

lib64 symlinked to lib causes duplicate collection warnings #401

Closed
gardar opened this issue Aug 26, 2024 · 3 comments
Closed

lib64 symlinked to lib causes duplicate collection warnings #401

gardar opened this issue Aug 26, 2024 · 3 comments
Labels

Comments

@gardar
Copy link

gardar commented Aug 26, 2024

In a virtualenv where lib64 is a symlink to lib, I'm encountering repeated "Multiple versions" warnings for Ansible collections:

WARNING  Multiple versions of 'amazon.aws' were found installed, only the first one will be used...

This behavior appears to be related to this PR: #379

Steps to Reproduce:

  1. Create a virtualenv
  2. Symlink lib64 to lib within the virtualenv
  3. Install Ansible
  4. Run Ansible commands, ansible-lint for example.

Expected Behavior:

Ansible should not report duplicate collection warnings when lib64 is symlinked to lib.

Additional Information:

ls -lah /opt/app-root/ | grep lib
drwxrwxr-x 1 default root 4.0K Aug 26 13:34 lib
lrwxrwxrwx 1 default root    3 Jun  5 12:03 lib64 -> lib
ls -lah /opt/app-root/lib/python3.12/site-packages/ansible_collections/
total 208K
drwxrwxr-x 50 default root 4.0K Aug 26 13:34 .
drwxrwxr-x  1 default root 4.0K Aug 26 13:34 ..
drwxrwxr-x  3 default root 4.0K Aug 26 13:34 amazon
drwxrwxr-x  6 default root 4.0K Aug 26 13:34 ansible
-rw-rw-r--  1 default root  714 Aug 26 13:34 ansible_community.py
-rw-rw-r--  1 default root  200 Aug 26 13:34 ansible_release.py
drwxrwxr-x  3 default root 4.0K Aug 26 13:34 arista
drwxrwxr-x  3 default root 4.0K Aug 26 13:34 awx
drwxrwxr-x  3 default root 4.0K Aug 26 13:34 azure
drwxrwxr-x  3 default root 4.0K Aug 26 13:34 check_point
ls -lah /opt/app-root/lib64/python3.12/site-packages/ansible_collections/
total 208K
drwxrwxr-x 50 default root 4.0K Aug 26 13:34 .
drwxrwxr-x  1 default root 4.0K Aug 26 13:34 ..
drwxrwxr-x  3 default root 4.0K Aug 26 13:34 amazon
drwxrwxr-x  6 default root 4.0K Aug 26 13:34 ansible
-rw-rw-r--  1 default root  714 Aug 26 13:34 ansible_community.py
-rw-rw-r--  1 default root  200 Aug 26 13:34 ansible_release.py
drwxrwxr-x  3 default root 4.0K Aug 26 13:34 arista
drwxrwxr-x  3 default root 4.0K Aug 26 13:34 awx
drwxrwxr-x  3 default root 4.0K Aug 26 13:34 azure
drwxrwxr-x  3 default root 4.0K Aug 26 13:34 check_point
@Qalthos Qalthos added the new label Sep 25, 2024
@xoxys
Copy link

xoxys commented Sep 26, 2024

Same here and it's pretty annoying as it is flooding the entire output if ansible-community is installed due to the amount of collections.

@ssbarnea
Copy link
Member

ssbarnea commented Oct 9, 2024

Current versions this message no longer appears and in any case, this has nothing to do with venvs. Adding these symlinks to them seems like a recipe for breaking things.

@ssbarnea ssbarnea closed this as not planned Won't fix, can't repro, duplicate, stale Oct 9, 2024
@xoxys
Copy link

xoxys commented Oct 9, 2024

Thanks for just closing the issue... This symlink is added automatically on venvs, nothing was configured manually here just install Ansible in a venv and give it a try. However, as this seems to be the new working mode across the Ansible community, maybe it's time to switch to another config management system.

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

No branches or pull requests

5 participants
@ssbarnea @gardar @Qalthos @xoxys and others