-
Notifications
You must be signed in to change notification settings - Fork 23.8k
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
action plugin in collection not loaded if collection keyword in task not defined #65071
Comments
Files identified in the description: If these files are inaccurate, please update the |
cc @nitzmahone |
Fixed by #65078 |
@samdoran @nitzmahone The PR you referred for this issue does not fix this issue. PR #65078 is specific to network code flow and it is added to allow scenario wherein the network connection plugins is moved to a collection. This issue is different, not specific to network and seems to be in the generic collection code path. I have shared the reproducer in the issue description. |
Fixes ansible#65071 * Load network action plugin that matches the module prefix name from list of collections.
* Fix network action plugin load in collection Fixes #65071 * Load network action plugin that matches the module prefix name from list of collections. * Update changelog * Fix unit test
* Fix network action plugin load in collection Fixes ansible#65071 * Load network action plugin that matches the module prefix name from list of collections. * Update changelog * Fix unit test (cherry picked from commit 74e9b1e)
* Fix network action plugin load in collection Fixes ansible#65071 * Load network action plugin that matches the module prefix name from list of collections. * Update changelog * Fix unit test
SUMMARY
If action plugin with the same name is present in collection and ansible core and if collections keyword is not defined in the paly the action plugin from the core is loaded instead of action plugin in collection
Works fine if collection keyword defined in the play eg:
PB1: https://gist.github.com/ganeshrn/7a7426aec0317277b16be1d9f5c83aed
Fails if collection keyword not defined in play eg:
PB2: https://gist.github.com/ganeshrn/3a2fabb690e29ceb00c02180666d1c83
Collection structure:
https://github.com/ganeshrn/network_collections_migration/tree/master/collections/ansible_collections/arista/eos
Value of collection_list at line for
PB1:
PB2:
ISSUE TYPE
COMPONENT NAME
lib/ansible/executor/task_executor.py (might be)
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
https://gist.github.com/ganeshrn/3a2fabb690e29ceb00c02180666d1c83
EXPECTED RESULTS
Should load action plugin from the collection itself even if the collection keyword not defined and the task name is FQCN.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: