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.
pull/70483/head
Baptiste Mille-Mathias 4 years ago committed by GitHub
parent 9164b96774
commit bd1378405b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save