Raise the bar for module `DOCUMENTAION`
This validator update was used to find the issues in https://github.com/ansible/ansible/pull/22297/files
**Validation**
* Updated Validation and docs to enforce more (items fixed in https://github.com/ansible/ansible/pull/22297/files)
* Use `suboptions` to document complex options
* Validate module name
* Validate deprecated modules have correct ANSIBLE_METADATA
**Module Documentation Generation**
* Document `suboptions:` Example https://gist.github.com/gundalow/4bdc3669d696268328ccc18528cc6718
* Tidy up HTML generation (valid HTML, no empty lists, etc)
**Documentation**
* Clarify the steps for deprecating a module
* Use correct RST headings
* Document `suboptions:` (options)
* Document `contains:` (returns)
**Details**
The aim is to get this (and corresponding module updates) complete by the time `devel` becomes `2.4`, as this allows us to raise the bar for new modules
Example `suboptions` https://gist.github.com/gundalow/4bdc3669d696268328ccc18528cc6718
The aim is to get this PR integrated into `devel` *before* we branch `stable-2.3`, this will allows us to:
* Raise the bar for new modules in 2.4
* Ensure the generated module documentation for 2.3 and higher is improved, important as we will be doing versioned docs moving forward.
can be included in Ansible, but modules (just due to the programming
can be included in Ansible, but modules (just due to the programming
@ -14,8 +15,9 @@ gives them slightly higher development priority (though they'll work in exactly
.. formerly marked with _module_dev_testing:
.. formerly marked with _module_dev_testing:
------------------------------
Contributing Modules Checklist
Contributing Modules Checklist
``````````````````````````````
------------------------------
The following checklist items are important guidelines for people who want to contribute to the development of modules to Ansible on GitHub. Please read the guidelines before you submit your PR/proposal.
The following checklist items are important guidelines for people who want to contribute to the development of modules to Ansible on GitHub. Please read the guidelines before you submit your PR/proposal.
@ -133,7 +135,7 @@ The complete module metadata specification is here: https://github.com/ansible/p
like :envvar:`API_USERNAME` would conflict between modules.
like :envvar:`API_USERNAME` would conflict between modules.
Windows modules checklist
Windows modules checklist
`````````````````````````
=========================
* Favour native powershell and .net ways of doing things over calls to COM libraries or calls to native executables which may or may not be present in all versions of Windows
* Favour native powershell and .net ways of doing things over calls to COM libraries or calls to native executables which may or may not be present in all versions of Windows
* modules are in powershell (.ps1 files) but the docs reside in same name python file (.py)
* modules are in powershell (.ps1 files) but the docs reside in same name python file (.py)
* look at ansible/lib/ansible/module_utils/powershell.ps1 for common code, avoid duplication
* look at ansible/lib/ansible/module_utils/powershell.ps1 for common code, avoid duplication
@ -158,7 +160,7 @@ To parse all arguments into a variable modules generally use:
$params = Parse-Args $args
$params = Parse-Args $args
Arguments
Arguments
+++++++++
---------
* Try and use state present and state absent like other modules
* Try and use state present and state absent like other modules
* You need to check that all your mandatory args are present. You can do this using the builtin Get-AnsibleParam function.
* You need to check that all your mandatory args are present. You can do this using the builtin Get-AnsibleParam function.
@ -175,7 +177,7 @@ Required arguments with name validation: