summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJan-Piet Mens <jpmens@gmail.com>2013-05-11 16:31:47 +0200
committerJan-Piet Mens <jpmens@gmail.com>2013-05-11 16:46:59 +0200
commiteeb80c695f2d4ab25bb8f2353370cdd2eb0f157c (patch)
treee79231fff58631cd2be670adee6417e5f616fe9f /bin
parent4ead6ee4fcc0a59b0ba5ab720e6fcf5457acbfb0 (diff)
downloadansible-eeb80c695f2d4ab25bb8f2353370cdd2eb0f157c.tar.gz
Add Requirements to rst template, ansible-doc
tweak position & look of Requirements in rst tweak APT's notes as per anhj's wish
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ansible-doc6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/ansible-doc b/bin/ansible-doc
index 5c7d8742be..5392ecdd51 100755
--- a/bin/ansible-doc
+++ b/bin/ansible-doc
@@ -86,6 +86,11 @@ def print_man(doc):
subsequent_indent=opt_indent)
+ if 'requirements' in doc and len(doc['requirements']) > 0:
+ req = ", ".join(doc['requirements'])
+ print "Requirements:%s\n" % textwrap.fill(tty_ify(req), initial_indent=" ",
+ subsequent_indent=opt_indent)
+
if 'examples' in doc and len(doc['examples']) > 0:
print "Example%s:\n" % ('' if len(doc['examples']) < 2 else 's')
for ex in doc['examples']:
@@ -94,6 +99,7 @@ def print_man(doc):
if 'plainexamples' in doc and doc['plainexamples'] is not None:
print doc['plainexamples']
+
def print_snippet(doc):
desc = tty_ify("".join(doc['short_description']))