diff options
author | Michael Leer <trozz1548+github@gmail.com> | 2014-07-01 19:05:18 +0200 |
---|---|---|
committer | Michael Leer <trozz1548+github@gmail.com> | 2014-07-01 19:05:18 +0200 |
commit | 37318ca0954fd6f32938206c230580271b349e4d (patch) | |
tree | 9314150e02b260d989b7a740513b82d362bea4dc /bin/ansible-doc | |
parent | Merge pull request #7972 from mscherer/fix_lxc (diff) | |
download | ansible-37318ca0954fd6f32938206c230580271b349e4d.tar.xz ansible-37318ca0954fd6f32938206c230580271b349e4d.zip |
include default options. #7938
amend ansible-doc to include default options as per feature request #7938
Diffstat (limited to 'bin/ansible-doc')
-rwxr-xr-x | bin/ansible-doc | 3 |
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)) |