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

Revert to previous behavior for ansible_collections_path #261

Merged
merged 1 commit into from
May 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/ansible_compat/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
# do not use lru_cache here, as environment can change between calls
def ansible_collections_path() -> str:
"""Return collection path variable for current version of Ansible."""
for env_var in [
"ANSIBLE_COLLECTIONS_PATH",
"ANSIBLE_COLLECTIONS_PATHS",
]:
if env_var in os.environ:
return env_var
return "ANSIBLE_COLLECTIONS_PATH"


Expand Down