Module deprecation: docs, scheme and tests (#34100)

Enforce module deprecation.
After module has reached the end of it's deprecation cycle we will replace it with a docs stub.

* Replace deprecated modules with docs-only sub
* Use of deprecated past deprecation cycle gives meaningful message (see examples below)
* Enforce documentation.deprecation dict via `schema.py`
* Update `ansible-doc` and web docs to display documentation.deprecation
* Document that structure in `dev_guide`
* Ensure that all modules starting with `_` have a `deprecation:` block
* Ensure `deprecation:` block is only used on modules that start with `_`
* `removed_in` A string which represents when this module needs **deleting**
* CHANGELOG.md and porting_guide_2.5.rst list removed modules as well as alternatives
* CHANGELOG.md links to porting guide index

To ensure that meaningful messages are given to the user if they try to use a module at the end of it's deprecation cycle we enforce the module to contain:
```python
if __name__ == '__main__':
    removed_module()
```
This commit is contained in:
John R Barker 2018-01-30 12:23:52 +00:00 committed by GitHub
parent 7c83f006c0
commit a23c95023b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 241 additions and 4438 deletions

View file

@ -20,8 +20,9 @@ author: Ansible Core Team (@ansible)
module: include
short_description: Include a play or task list
deprecated:
The include action was too confusing, dealing with both plays and tasks, being both dynamic and static. This module
will be removed in version 2.8. As alternatives use M(include_tasks), M(import_playbook), M(import_tasks).
removed_in: "2.8"
why: The include action was too confusing, dealing with both plays and tasks, being both dynamic and static. This module will be removed in version 2.8.
alternative: Use M(include_tasks), M(import_playbook), M(import_tasks).
description:
- Includes a file with a list of plays or tasks to be executed in the current playbook.
- Files with a list of plays can only be included at the top level. Lists of tasks can only be included where tasks