diff options
author | Jan-Piet Mens <jpmens@gmail.com> | 2013-05-11 16:31:47 +0200 |
---|---|---|
committer | Jan-Piet Mens <jpmens@gmail.com> | 2013-05-11 16:46:59 +0200 |
commit | eeb80c695f2d4ab25bb8f2353370cdd2eb0f157c (patch) | |
tree | e79231fff58631cd2be670adee6417e5f616fe9f /bin | |
parent | 4ead6ee4fcc0a59b0ba5ab720e6fcf5457acbfb0 (diff) | |
download | ansible-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-x | bin/ansible-doc | 6 |
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'])) |