You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like collection_prep_add_docs -p . looks for plugins/doc_fragments in the collection search path, not in the current directory (see community.vmware#1062 ff).
I think that not searching for plugins/doc_fragments in the directory defined with -p breaks the principle of least astonishment.
The text was updated successfully, but these errors were encountered:
I want to add the actual error message. The error message indicates that the issue is not easy to fix as the doc generation is integrated from the ansible python module site-packages/ansible/utils/plugin_docs.py. I did not check if plugin_docs is able to take a custom path as input.
Traceback (most recent call last):
File "/root/.local/share/virtualenvs/Ansible.Collection-4Fc_I88C/bin/collection_prep_add_docs", line 8, in <module>
sys.exit(main())
File "/root/.local/share/virtualenvs/Ansible.Collection-4Fc_I88C/lib/python3.8/site-packages/collection_prep/cmd/add_docs.py", line 549, in main
content = process(collection=collection, path=path)
File "/root/.local/share/virtualenvs/Ansible.Collection-4Fc_I88C/lib/python3.8/site-packages/collection_prep/cmd/add_docs.py", line 333, in process
) = plugin_docs.get_docstring(fullpath, fragment_loader)
File "/root/.local/share/virtualenvs/Ansible.Collection-4Fc_I88C/lib/python3.8/site-packages/ansible/utils/plugin_docs.py", line 217, in get_docstring
add_fragments(data['doc'], filename, fragment_loader=fragment_loader, is_module=is_module)
File "/root/.local/share/virtualenvs/Ansible.Collection-4Fc_I88C/lib/python3.8/site-packages/ansible/utils/plugin_docs.py", line 201, in add_fragments
raise AnsibleError('unknown doc_fragment(s) in file {0}: {1}'.format(filename, to_native(', '.join(unknown_fragments))))
ansible.errors.AnsibleError: unknown doc_fragment(s) in file /opt/git_azure/Ansible.Collection/plugins/modules/my_module_item.py: ansible.collection.module_fragment
It looks like
collection_prep_add_docs -p .
looks forplugins/doc_fragments
in the collection search path, not in the current directory (see community.vmware#1062 ff).I think that not searching for
plugins/doc_fragments
in the directory defined with-p
breaks the principle of least astonishment.The text was updated successfully, but these errors were encountered: