mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
Fix ansible-doc and docsite generation for removed modules
* Fix ansible-doc wrt removed modules * Fix listing of modules ia ansible-doc to not complain about removed modules Removed modules are marked as such in the metadata but nowhere else. Need to retrieve the metadata when a module doesn't have a doc so that we can tell if it falls under this case. * omit removed modules from json dump * Print an error that the module has been removed if attempting to run ansible-doc on that specific module * Get plugin_formatter to stop outputting removed modules
This commit is contained in:
parent
b2932a41b0
commit
0873d46617
4 changed files with 59 additions and 53 deletions
|
@ -120,16 +120,3 @@ def get_docstring(filename, fragment_loader, verbose=False, ignore_errors=False)
|
|||
add_fragments(data['doc'], filename, fragment_loader=fragment_loader)
|
||||
|
||||
return data['doc'], data['plainexamples'], data['returndocs'], data['metadata']
|
||||
|
||||
|
||||
def get_docstub(filename, fragment_loader, verbose=False, ignore_errors=False):
|
||||
"""
|
||||
When only short_description is needed, load a stub of the full DOCUMENTATION string to speed up operation.
|
||||
"""
|
||||
|
||||
data = read_docstub(filename, verbose=verbose, ignore_errors=ignore_errors)
|
||||
|
||||
if data.get('doc', False):
|
||||
add_fragments(data['doc'], filename, fragment_loader=fragment_loader)
|
||||
|
||||
return data['doc'], data['plainexamples'], data['returndocs'], data['metadata']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue