Repository navigation
Conversation
Roles can document the variables they set via an optional return: block per entry point in meta/argument_specs.yml, using the same format as module return values (rendered as a "Return Variables" table by ansible-doc and antsibull-docs). Document the field and its sub-keys in the role argument spec "Specification format" section, and add a return: block to the sample. Discussion: https://forum.ansible.com/t/proposal-document-role-return-variables-in-argument-specs-yml-like-module-return/46469 Refs: ansible-community/antsibull-docs#491 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
Thanks for your Ansible docs contribution! We talk about Ansible documentation on Matrix at #docs:ansible.im if you ever want to join us and chat about the docs! We meet on Matrix every Tuesday. See the Ansible calendar for meeting details. We welcome additions to our weekly agenda items too. You can add the |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
Document the optional
return:key for roles in the role argument-spec "Specification format" section.Roles can document the variables they set via a
return:block per entry point inmeta/argument_specs.yml, using the same format as module return values.ansible-docand antsibull-docs render it as a "Return Variables" table. This documents the field and its sub-keys (description,type,elements,returned,sample,choices,version_added, nestedcontains), and adds areturn:block to the sample specification.Marked draft pending the ecosystem discussion linked below. This is the documentation piece of a cross-repo effort:
ansible-doctext output): ansible-doc - show role return values in text output ansible#87686ISSUE TYPE
COMPONENT NAME
docs/docsite/rst/playbook_guide/playbooks_reuse_roles.rst
ADDITIONAL INFORMATION
Discussion: https://forum.ansible.com/t/proposal-document-role-return-variables-in-argument-specs-yml-like-module-return/46469
Refs: ansible-community/antsibull-docs#491