-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
make collection warning message clearer #74859
make collection warning message clearer #74859
Conversation
lib/ansible/cli/galaxy.py
Outdated
"collections paths '%s'. The installed collection won't be picked up in an Ansible " | ||
"run." % (to_text(path), to_text(":".join(collections_path)))) | ||
"run, unless within a playbook adjacent collections directory." % (to_text(path), to_text(":".join(collections_path)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wording doesn't really clarify the issue. It's probably easier to change the "won't" to "may".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this sound?
The specified collections path '%s' is not part of the configured Ansible collections paths '%s'. The installed collection may not be picked up in an Ansible run, unless within a playbook adjacent collections directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The phrase "unless within a playbook adjacent collections directory" is a mouthful. It's also not immediately apparent what that means unless the reader is well versed in Ansible jargon.
The specified collections path '%s' is not part of the configured Ansible collections paths '%s'. The installed collection may not be picked up in an Ansible run.
If there is a strong desire to mention adjacency (I know this was explicitly requested in the related issue, but I don't think it's the clearest phrasing), then something like this is probably best:
The specified collections path '%s' is not part of the configured Ansible collections paths '%s'. The installed collection will not be picked up in an Ansible run unless adjacent to a playbook.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the changes from the comments. LGTM
Thanks @fchyla for the Ansible docs fix! |
SUMMARY
Fix for #74767 collection warning message
ISSUE TYPE
COMPONENT NAME
lib/ansible/cli
ADDITIONAL INFORMATION
Make the warning message state clearer and state that it will pick up a collection if it's within a playbook adjacent directory.