Small documentation fixes (#70480)
* Add type for options in the sample module shown in Developing Modules, as this is required to have the tests being green * Remove duplicated strings: the same sentence is in "Python tips" and "Module security", keeping the latter.
This commit is contained in:
parent
9164b96774
commit
bd1378405b
2 changed files with 2 additions and 1 deletions
|
@ -53,7 +53,6 @@ Functions and Methods
|
|||
Python tips
|
||||
===========
|
||||
|
||||
* When fetching URLs, use ``fetch_url`` or ``open_url`` from ``ansible.module_utils.urls``. Do not use ``urllib2``, which does not natively verify TLS certificates and so is insecure for https.
|
||||
* Include a ``main`` function that wraps the normal execution.
|
||||
* Call your ``main`` function from a conditional so you can import it into unit tests - for example:
|
||||
|
||||
|
|
|
@ -78,10 +78,12 @@ To create a new module:
|
|||
name:
|
||||
description:
|
||||
- This is the message to send to the test module
|
||||
type: str
|
||||
required: true
|
||||
new:
|
||||
description:
|
||||
- Control to demo if the result of this module is changed or not
|
||||
type: bool
|
||||
required: false
|
||||
|
||||
extends_documentation_fragment:
|
||||
|
|
Loading…
Add table
Reference in a new issue