mirror of https://github.com/ansible/ansible.git
Fix loading namespaced doc_fragments from collections (#55249)
* Fix loading namespaced doc_fragments
The syntax for specifying a different fragment name was already
using '.' as a separator, so the code needed to be tweaked to
avoid choking on names like `testns.testcoll.fragname` and
`testns.testcoll.fragname.altvar`.
`get_plugin_class()` returns 'docfragment' for the fragment loader;
mangling `subdir` provides consistent alignment with the normal plugin
directory names and avoids needing special handling of plugin types
with 'module' in the name.
* Add changelog entry
(cherry picked from commit 2ef8b297ff)
pull/56658/head
parent
4818ec2823
commit
00b4a52633
@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- Fixed loading namespaced documentation fragments from collections.
|
||||
@ -0,0 +1,14 @@
|
||||
class ModuleDocFragment(object):
|
||||
DOCUMENTATION = r'''
|
||||
options:
|
||||
normal_doc_frag:
|
||||
description:
|
||||
- an option
|
||||
'''
|
||||
|
||||
OTHER_DOCUMENTATION = r'''
|
||||
options:
|
||||
other_doc_frag:
|
||||
description:
|
||||
- another option
|
||||
'''
|
||||
Loading…
Reference in New Issue