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

For Ansible 2.10 compat, change imports to use module_utils already in this collection #173

Closed
wants to merge 2 commits into from

Conversation

AlanCoding
Copy link
Contributor

SUMMARY

This collection will not work with Ansible 2.10 because that will no longer host the old module_utils specific to content like this.

I verified that imports fail with ansible==2.10.0a1.

This solution, using relative imports, will sacrifice compatibility with Ansible 2.8, and I am updating metadata to reflect that. It is still possible to make this work with both 2.8 and 2.10 if you type out the fully qualified collection name for each import, which is like

from ansible_collections.azure.azcollection.plugins.module_utils.azure_rm_common import AzureRMModuleBase, normalize_location_name

As you can see from this link, some modules already use these fully-qualified style imports. I'm not changing those here.

Why are some modules using fully-qualified imports and others not? I see the one I linked in #45, which states that it is the 4th migration of modules... and I can find #52 migrated a much larger number without using the fully-qualified imports.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

plugins/module_utils

ADDITIONAL INFORMATION

The module utils were already here:

I previously put up #115, and this is very similar, although it's not moving anything, just redirecting stuff.

@AlanCoding
Copy link
Contributor Author

I think @Fred-sun addressed all these in #140

@AlanCoding AlanCoding closed this Jun 28, 2020
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

Successfully merging this pull request may close these issues.

1 participant