From b2f7e583d3c02283ef52abbc8a11d9ffaa8354a3 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 1 Mar 2017 13:09:05 -0500 Subject: [PATCH] moved metadata to bottom --- lib/ansible/cli/doc.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/ansible/cli/doc.py b/lib/ansible/cli/doc.py index e1b6d7b050..efc63e9fe9 100644 --- a/lib/ansible/cli/doc.py +++ b/lib/ansible/cli/doc.py @@ -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)