Navigation Menu

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

Some action plugins remove FQCN #60308

Closed
mkrizek opened this issue Aug 9, 2019 · 4 comments
Closed

Some action plugins remove FQCN #60308

mkrizek opened this issue Aug 9, 2019 · 4 comments
Labels
affects_2.9 This issue/PR affects Ansible v2.9 affects_2.10 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. collection Related to Ansible Collections work support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Comments

@mkrizek
Copy link
Contributor

mkrizek commented Aug 9, 2019

SUMMARY

Some action plugins use hardcoded module names which results in removing FQCN. Need to audit action plugins and take task.action into account?

Example:

ISSUE TYPE
  • Bug Report
COMPONENT NAME

action plugins

ANSIBLE VERSION
2.8
2.9
CONFIGURATION

N/A

OS / ENVIRONMENT

N/A

STEPS TO REPRODUCE

Following the example from the summary above: have a collection with action/yum.py and modules/yum.py (copied over from lib/ansible/plugins/action/yum.py and lib/ansible/modules/packaging/os/yum.py). Run a task using FQCN: my_namespace.my_collection.yum.

Do not have the collection specified in collections: which workarounds the issue.

EXPECTED RESULTS

my_namespace.my_collection.yum is executed.

ACTUAL RESULTS

Whatever the action plugin puts into module_name that is passed into execute_module is executed.

@mkrizek mkrizek added the collection Related to Ansible Collections work label Aug 9, 2019
@ansibot
Copy link
Contributor

ansibot commented Aug 9, 2019

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Aug 9, 2019
@webknjaz
Copy link
Member

webknjaz commented Aug 9, 2019

Should we patch ActionBase._execute_module() to inspect the current collection context?

@ansibot ansibot added the needs_triage Needs a first human triage before being processed. label May 16, 2020
@jimi-c jimi-c added affects_2.10 This issue/PR affects Ansible v2.10 affects_2.9 This issue/PR affects Ansible v2.9 and removed affects_2.8 This issue/PR affects Ansible v2.8 needs_triage Needs a first human triage before being processed. labels May 19, 2020
@sivel
Copy link
Member

sivel commented Jun 7, 2021

Is this still a problem? I believe we've updated them all to utilize ansible.legacy now. In the yum action we now do module = 'ansible.legacy.' + module

@bcoca
Copy link
Member

bcoca commented Jun 7, 2021

fixed by #71824

@mkrizek mkrizek closed this as completed Jun 8, 2021
@ansible ansible locked and limited conversation to collaborators Jul 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 affects_2.10 This issue/PR affects Ansible v2.10 bug This issue/PR relates to a bug. collection Related to Ansible Collections work support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

No branches or pull requests

6 participants