Skip to content
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

Allow to mark module parameters as undocumented / private #79695

Open
1 task done
felixfontein opened this issue Jan 9, 2023 · 2 comments
Open
1 task done

Allow to mark module parameters as undocumented / private #79695

felixfontein opened this issue Jan 9, 2023 · 2 comments
Labels
affects_2.17 feature This issue/PR relates to a feature request. has_pr This issue has an associated PR.

Comments

@felixfontein
Copy link
Contributor

Summary

Right now modules that come with action plugins often have some 'private' module parameters that are used by the action plugin, and should not be shown to the user in the documentation. Unfortunately the sanity tests complain about this, and one has to add ignore.txt rules to shut them up. Even more unfortunately, these ignore.txt rules can easily hide real mistakes in the documentation.

I propose to make it possible to explicitly mark options as undocumented or private, so that the sanity tests can enforce that these are undocumented, and no ignore.txt entries are needed.

A more concrete proposal would be to add something to the argument spec, for example some_option=dict(type='str', undocumented=True). (Adding it somewhere to DOCUMENTATION instead makes it show up in the ansible-doc output.)

Issue Type

Feature Idea

Component Name

module argument spec

Additional Information

Grep for validate-modules:undocumented-parameter in test/sanity/ignore.txt in ansible/ansible:

lib/ansible/modules/command.py validate-modules:undocumented-parameter
lib/ansible/modules/copy.py validate-modules:undocumented-parameter
lib/ansible/modules/file.py validate-modules:undocumented-parameter
lib/ansible/modules/stat.py validate-modules:undocumented-parameter
lib/ansible/modules/yum_repository.py validate-modules:undocumented-parameter

There are multiple other entries for the same reason.

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibot
Copy link
Contributor

ansibot commented Jan 9, 2023

Files identified in the description:
None

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot ansibot added affects_2.15 feature This issue/PR relates to a feature request. has_pr This issue has an associated PR. needs_triage Needs a first human triage before being processed. labels Jan 9, 2023
@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label Jan 10, 2023
@s-hertel
Copy link
Contributor

Depends on #79720

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.17 feature This issue/PR relates to a feature request. has_pr This issue has an associated PR.
Projects
None yet
Development

No branches or pull requests

4 participants