Do not show empty version_added_collection values in ansible-doc text output. (#74999)

This commit is contained in:
Felix Fontein 2021-06-14 23:26:40 +02:00 committed by GitHub
parent 77e936bd50
commit 58450f041a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -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)."

View file

@ -1057,6 +1057,10 @@ class DocCLI(CLI, RoleMixin):
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