diff options
author | Brian Coca <brian.coca+git@gmail.com> | 2015-11-11 11:14:38 -0800 |
---|---|---|
committer | Brian Coca <brian.coca+git@gmail.com> | 2015-11-11 11:15:22 -0800 |
commit | be22a670e5f2dc287df1b3e5c841dfb4f4e34299 (patch) | |
tree | d831c8a212e25b555aea2cc26cbf659d5e6a96dd | |
parent | 1b349fdf34426d5c5fb1e341e98c0b76744ced42 (diff) | |
download | ansible-be22a670e5f2dc287df1b3e5c841dfb4f4e34299.tar.gz |
addes deprecated information to ansible-doc display
fixes #13118
-rw-r--r-- | lib/ansible/cli/doc.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ansible/cli/doc.py b/lib/ansible/cli/doc.py index 0cdf294be5..8c1acd705c 100644 --- a/lib/ansible/cli/doc.py +++ b/lib/ansible/cli/doc.py @@ -239,6 +239,9 @@ class DocCLI(CLI): text.append("%s\n" % textwrap.fill(CLI.tty_ify(desc), limit, initial_indent=" ", subsequent_indent=" ")) + if 'deprecated' in doc and doc['deprecated'] is not None and len(doc['deprecated']) > 0: + text.append("DEPRECATED: \n%s\n" % doc['deprecated']) + if 'option_keys' in doc and len(doc['option_keys']) > 0: text.append("Options (= is mandatory):\n") @@ -269,7 +272,6 @@ class DocCLI(CLI): notes = " ".join(doc['notes']) text.append("Notes:%s\n" % textwrap.fill(CLI.tty_ify(notes), limit-6, initial_indent=" ", subsequent_indent=opt_indent)) - if 'requirements' in doc and doc['requirements'] is not None and len(doc['requirements']) > 0: req = ", ".join(doc['requirements']) text.append("Requirements:%s\n" % textwrap.fill(CLI.tty_ify(req), limit-16, initial_indent=" ", subsequent_indent=opt_indent)) |