mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
Add support for additional EXAMPLES string in Ansible modules
return DOC and EXAMPLES as a list add moduledev explanation more
This commit is contained in:
parent
093935ede1
commit
396a07bcc7
7 changed files with 50 additions and 7 deletions
|
@ -296,7 +296,7 @@ def main():
|
|||
js_data.append(j)
|
||||
continue
|
||||
|
||||
doc = ansible.utils.module_docs.get_docstring(fname, verbose=options.verbose)
|
||||
doc, examples = ansible.utils.module_docs.get_docstring(fname, verbose=options.verbose)
|
||||
|
||||
if doc is None and module not in ansible.utils.module_docs.BLACKLIST_MODULES:
|
||||
sys.stderr.write("*** ERROR: CORE MODULE MISSING DOCUMENTATION: %s ***\n" % module)
|
||||
|
@ -314,6 +314,7 @@ def main():
|
|||
doc['docuri'] = doc['module'].replace('_', '-')
|
||||
doc['now_date'] = datetime.date.today().strftime('%Y-%m-%d')
|
||||
doc['ansible_version'] = options.ansible_version
|
||||
doc['plainexamples'] = examples #plain text
|
||||
|
||||
if options.includes_file is not None and includefmt != "":
|
||||
incfile.write(includefmt % module)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue