-
Notifications
You must be signed in to change notification settings - Fork 23.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ansible-doc: export has_action when --json is used #72359
Conversation
This would help users who needed the details of action plugins when they need them. Thanks @felixfontein. |
…at_plugin_doc and the functions it calls anyway.
Looks good! +1 |
Corresponding antsibull change: ansible-community/antsibull-build#206 |
else: | ||
doc['action'] = False | ||
|
||
doc['now_date'] = datetime.date.today().strftime('%Y-%m-%d') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you removing these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean now_date
and docuri
? Because they are not used at all. In this code-path, they are only passed to get_snippet_text
and get_man_text
:
get_snippet_text
uses onlyshort_description
,module
andoptions
.get_man_text
explicitly ignores them as they are inDocCLI.IGNORE
.
(Besides that, what the code does with docuri
is strange and will probably fail if that key is ever encountered, since doc[plugin_type]
usually results in a KeyError
nowadays.)
* ansible-doc: export has_action when --json is used. * Remove docuri and now_data, which were not used resp. ignored in format_plugin_doc and the functions it calls anyway. * Add function _combine_plugin_doc. (cherry picked from commit 4fb336c)
* ansible-doc: export has_action when --json is used. * Remove docuri and now_data, which were not used resp. ignored in format_plugin_doc and the functions it calls anyway. * Add function _combine_plugin_doc. (cherry picked from commit 4fb336c)
* Add new doc parsing backend script which more efficiently dumps all necessary data about collections and plugin docs. * Use new script instead of ansible-doc. * Make sure that proper JSON serialization is used. * Make doc parsing backend configurable. * Improve filtering. * Equivalent to ansible/ansible#72359. * Change default backend to ansible-internal.
SUMMARY
Improve feature parity between
ansible-doc
andansible-doc --json
. Needed to include this information in the docs build.ISSUE TYPE
COMPONENT NAME
ansible-doc