For Ansible 2.10 compat, change imports to use module_utils already in this collection #173
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
azure/plugins/modules/azure_rm_resourcegroup.py
Line 132 in 8aad2a0
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
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.