"python" command to invoke modules directly does not work with "plugins" directory structure #2374
Open
1 task done
Labels
bug
Something isn't working
needs_triage
Needs a first human triage before being processed.
new_contributor
This PR is the first contribution by a new community member.
Summary
The Ansible documentation at https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#verifying-your-module-code-locally shows this:
/tmp/args.json
and add the following content:This approach does not work when the collection uses the recommended
plugins
subdirectory structure and the module imports from themodule_utils
directory:File
plugins/module_utils/utils.py
:File
plugins/modules/mod1.py
:The approach shown in the documentation fails for such a module with:
Such a module passes the Ansible sanity test, so it must be valid.
By the way, the documented approach of using
ansible -m ...
("ad-hoc" command) also does not work with theplugins
directory structure.Issue Type
Bug Report
Component Name
documentation
Ansible Version
Configuration
OS / Environment
macOS 14.2.7
Python 3.12.7
Steps to Reproduce
The issue can be demonstrated with the
ibm.ibm_zhmc
collection:Expected Results
The documentation should show an approach for locally invoking modules that works with the recommended
plugins
directory structure.Actual Results
See above
Code of Conduct
The text was updated successfully, but these errors were encountered: