Skip to content
New issue

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

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

Already on GitHub? # to your account

antsibull-docs does not always use the collection_path configured in ansible #343

Open
ssbarnea opened this issue Sep 24, 2024 · 2 comments
Labels
question Further information is requested

Comments

@ssbarnea
Copy link
Member

ssbarnea commented Sep 24, 2024

I detected a bug where antsibull-docs collection command will ignore a collection path configured inside ansible.cfg file. Apparently current logic implemented is to only recognize the environment variables overrides but fails to ask ansible about effective collection path used, ansible-config dump being the most effective way to report it (but even ansible --version would report it)

$ ansible-config dump|grep COLLECTIONS_PATHS
COLLECTIONS_PATHS(/Volumes/code/a/ansible_collections/ansible/eda/ansible.cfg) = ['/Volumes/code/a/ansible_collections/ansible/eda/collections']

Based on my debugging the issue seems to be caused by

def _get_existing_collections_path() -> str | None:

The issue is not critical as defining ANSIBLE_COLLECTIONS_PATH=... before calling the tool can be used as a workaround for forcing it to look elsewhere.

@felixfontein
Copy link
Collaborator

antsibull-docs does not use ansible.cfg at all. That is a file used by ansible-core. So I don't see what ansible.cfg has to do with antsibull-docs.

Since you do not describe the situation in which you use antsibull-docs and encoutner this it is impossible to say anything about this, since the behavior of antsibull-docs varies greatly depending on the subcommand and the parameters passed.

@felixfontein felixfontein added the question Further information is requested label Sep 24, 2024
@felixfontein
Copy link
Collaborator

@ssbarnea can you please add the missing information? Thanks.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants