Skip to content

Commit

Permalink
Do not show empty version_added_collection values in ansible-doc text…
Browse files Browse the repository at this point in the history
… output. (ansible#74999)
  • Loading branch information
felixfontein authored Jun 14, 2021
1 parent 77e936b commit 58450f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- "ansible-doc - in text output, do not show empty ``version_added_collection`` values (https://github.com/ansible/ansible/pull/74999)."
4 changes: 4 additions & 0 deletions lib/ansible/cli/doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,10 @@ def add_fields(text, fields, limit, opt_indent, return_values=False, base_indent
if conf:
text.append(DocCLI._dump_yaml({'set_via': conf}, opt_indent))

# Remove empty version_added_collection
if opt.get('version_added_collection') == '':
opt.pop('version_added_collection')

for k in sorted(opt):
if k.startswith('_'):
continue
Expand Down

0 comments on commit 58450f0

Please sign in to comment.