mirror of
https://github.com/ansible/ansible.git
synced 2026-08-03 00:22:10 +02:00
ansible-doc: remove displaying role attributes (#85725)
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
removed_features:
|
||||
- "ansible-doc - role entrypoint attributes are no longer shown"
|
||||
@@ -1431,23 +1431,6 @@ class DocCLI(CLI, RoleMixin):
|
||||
text.append(_format("Options", 'bold') + " (%s indicates it is required):" % ("=" if C.ANSIBLE_NOCOLOR else 'red'))
|
||||
DocCLI.add_fields(text, doc.pop('options'), limit, opt_indent)
|
||||
|
||||
if doc.get('attributes', False):
|
||||
display.deprecated(
|
||||
f'The role {role}\'s argument spec {entry_point} contains the key "attributes", '
|
||||
'which will not be displayed by ansible-doc in the future. '
|
||||
'This was unintentionally allowed when plugin attributes were added, '
|
||||
'but the feature does not map well to role argument specs.',
|
||||
version='2.20',
|
||||
)
|
||||
text.append("")
|
||||
text.append(_format("ATTRIBUTES:", 'bold'))
|
||||
for k in doc['attributes'].keys():
|
||||
text.append('')
|
||||
text.append(DocCLI.warp_fill(DocCLI.tty_ify(_format('%s:' % k, 'UNDERLINE')), limit - 6, initial_indent=opt_indent,
|
||||
subsequent_indent=opt_indent))
|
||||
text.append(DocCLI._indent_lines(DocCLI._dump_yaml(doc['attributes'][k]), opt_indent))
|
||||
del doc['attributes']
|
||||
|
||||
if notes := doc.pop('notes', False):
|
||||
text.append("")
|
||||
text.append(_format("NOTES:", 'bold'))
|
||||
|
||||
-4
@@ -20,10 +20,6 @@ argument_specs:
|
||||
description:
|
||||
- Longer description for testns.testcol.testrole alternate entry point.
|
||||
author: Ansible Core (@ansible)
|
||||
attributes:
|
||||
check_mode:
|
||||
description: Can run in check_mode and return changed status prediction without modifying target
|
||||
support: full
|
||||
version_added: 2.1.0
|
||||
options:
|
||||
altopt1:
|
||||
|
||||
@@ -12,13 +12,6 @@ Options (= indicates it is required):
|
||||
= altopt1 altopt1 description
|
||||
type: int
|
||||
|
||||
ATTRIBUTES:
|
||||
|
||||
`check_mode:`
|
||||
description: Can run in check_mode and return changed status prediction without modifying
|
||||
target
|
||||
support: full
|
||||
|
||||
AUTHOR: Ansible Core (@ansible)
|
||||
|
||||
EXAMPLES:
|
||||
|
||||
@@ -27,14 +27,6 @@ Options (= indicates it is required):
|
||||
default: null
|
||||
type: str
|
||||
|
||||
ATTRIBUTES:
|
||||
|
||||
`diff_mode:`
|
||||
description: Will return details on what has changed (or possibly needs changing in
|
||||
check_mode), when in diff mode
|
||||
details: Not all modules used support this
|
||||
support: partial
|
||||
|
||||
NOTES:
|
||||
* This is a role.
|
||||
* More text.
|
||||
|
||||
@@ -11,11 +11,6 @@ argument_specs:
|
||||
author:
|
||||
- John Doe (@john)
|
||||
- Jane Doe (@jane)
|
||||
attributes:
|
||||
diff_mode:
|
||||
description: Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode
|
||||
support: partial
|
||||
details: Not all modules used support this
|
||||
version_added: 1.2.0
|
||||
notes:
|
||||
- This is a role.
|
||||
|
||||
@@ -229,7 +229,6 @@ test/integration/targets/ansible-test-sanity-pylint/deprecated_thing.py pylint:a
|
||||
test/integration/targets/ansible-test-sanity-pylint/deprecated_thing.py pylint:ansible-deprecated-date-not-permitted # required to verify plugin against core
|
||||
test/integration/targets/ansible-test-sanity-pylint/deprecated_thing.py pylint:ansible-deprecated-unnecessary-collection-name # required to verify plugin against core
|
||||
test/integration/targets/ansible-test-sanity-pylint/deprecated_thing.py pylint:ansible-deprecated-collection-name-not-permitted # required to verify plugin against core
|
||||
lib/ansible/cli/doc.py pylint:ansible-deprecated-version # TODO: 2.20
|
||||
lib/ansible/galaxy/api.py pylint:ansible-deprecated-version # TODO: 2.20
|
||||
lib/ansible/utils/encrypt.py pylint:ansible-deprecated-version # TODO: 2.20
|
||||
lib/ansible/utils/ssh_functions.py pylint:ansible-deprecated-version # TODO: 2.20
|
||||
|
||||
Reference in New Issue
Block a user