1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

moved metadata to bottom

This commit is contained in:
Brian Coca 2017-03-01 13:09:05 -05:00
parent c26cac2a53
commit b2f7e583d3

View file

@ -269,15 +269,6 @@ class DocCLI(CLI):
if 'deprecated' in doc and doc['deprecated'] is not None and len(doc['deprecated']) > 0:
text.append("DEPRECATED: \n%s\n" % doc['deprecated'])
if doc['metadata'] and isinstance(doc['metadata'], dict):
text.append("Metadata:")
for k in doc['metadata']:
if isinstance(k, list):
text.append("\t%s: %s" % (k.capitalize(), ", ".join(doc['metadata'][k])))
else:
text.append("\t%s: %s" % (k.capitalize(), doc['metadata'][k]))
text.append("")
if 'action' in doc and doc['action']:
text.append(" * note: %s\n" % "This module has a corresponding action plugin.")
@ -349,4 +340,13 @@ class DocCLI(CLI):
text.append('MAINTAINERS: ' + ', '.join(maintainers))
text.append('')
if doc['metadata'] and isinstance(doc['metadata'], dict):
text.append("Metadata:")
for k in doc['metadata']:
if isinstance(k, list):
text.append("\t%s: %s" % (k.capitalize(), ", ".join(doc['metadata'][k])))
else:
text.append("\t%s: %s" % (k.capitalize(), doc['metadata'][k]))
text.append("")
return "\n".join(text)