summaryrefslogtreecommitdiff
path: root/bin/ansible-doc
diff options
context:
space:
mode:
authorMichael Leer <trozz1548+github@gmail.com>2014-07-01 18:05:18 +0100
committerMichael Leer <trozz1548+github@gmail.com>2014-07-01 18:05:18 +0100
commit37318ca0954fd6f32938206c230580271b349e4d (patch)
tree9314150e02b260d989b7a740513b82d362bea4dc /bin/ansible-doc
parent14cf3c4d2a2444a24c3329e6ed3c280e8e8ab904 (diff)
downloadansible-37318ca0954fd6f32938206c230580271b349e4d.tar.gz
include default options. #7938
amend ansible-doc to include default options as per feature request #7938
Diffstat (limited to 'bin/ansible-doc')
-rwxr-xr-xbin/ansible-doc3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/ansible-doc b/bin/ansible-doc
index a77fff8130..9faff67507 100755
--- a/bin/ansible-doc
+++ b/bin/ansible-doc
@@ -113,6 +113,9 @@ def get_man_text(doc):
if 'choices' in opt:
choices = ", ".join(str(i) for i in opt['choices'])
desc = desc + " (Choices: " + choices + ")"
+ if 'default' in opt:
+ default = str(opt['default'])
+ desc = desc + " [Default: " + default + "]"
text.append("%s\n" % textwrap.fill(tty_ify(desc), initial_indent=opt_indent,
subsequent_indent=opt_indent))