ansible/ansible — pull request #6154 by sivel (2014-02-24 21:04:28+00:00)
Title: Add support for shared module documentation fragments

See https://groups.google.com/forum/#!topic/ansible-devel/B-Md0nYB0s4

This pull request adds support for shared module documentation fragments.

Modules can share documentation, by extending a fragment located in `ansible/utils/module_docs_fragments.py`

The code that handles the merging, is done in `ansible/utils/module_docs.py`

The `notes` section is appended to. All other sections are looped over and either set if they don't exist in the fragment, or updated.

I've added the fragments for the `rax` modules thus far. Since I was touching the DOCUMENTATION strings for all `rax` modules, I also made some cleanup there as well.

Sample DOCUMENTATION from a module:

```yaml
---
module: rax_queue
short_description: create / delete a queue in Rackspace Public Cloud
description:
- creates / deletes a Rackspace Public Cloud queue.
version_added: "1.5"
options:
name:
description:
- Name to give the queue
default: null
state:
description:
- Indicate desired state of the resource
choices:
- present
- absent
default: present
author: Christopher H. Laco, Matt Martz
extends_documentation_fragment: RACKSPACE
```

The `extends_documentation_fragment` key references a variable from `ansible/utils/module_docs_fragments.py`. The provided value is always uppercased.