Couple things to watch out for when reviewing facts modules
This commit is contained in:
parent
2dd5e13098
commit
7e71299ee1
1 changed files with 8 additions and 1 deletions
|
@ -721,7 +721,14 @@ The following checklist items are important guidelines for people who want to c
|
||||||
fields of a dictionary and return the dictionary.
|
fields of a dictionary and return the dictionary.
|
||||||
* When fetching URLs, please use either fetch_url or open_url from ansible.module_utils.urls
|
* When fetching URLs, please use either fetch_url or open_url from ansible.module_utils.urls
|
||||||
rather than urllib2; urllib2 does not natively verify TLS certificates and so is insecure for https.
|
rather than urllib2; urllib2 does not natively verify TLS certificates and so is insecure for https.
|
||||||
|
* facts modules must return facts in the ansible_facts field of the result
|
||||||
|
dictionary. :ref:`module_provided_facts`
|
||||||
|
* modules that are purely about fact gathering need to implement check_mode.
|
||||||
|
they should not cause any changes anyway so it should be as simple as adding
|
||||||
|
check_mode=True when instantiating AnsibleModule. (The reason is that
|
||||||
|
playbooks which conditionalize based on fact information will only
|
||||||
|
conditionalize correctly in check_mode if the facts are returned in
|
||||||
|
check_mode).
|
||||||
|
|
||||||
Windows modules checklist
|
Windows modules checklist
|
||||||
`````````````````````````
|
`````````````````````````
|
||||||
|
|
Loading…
Reference in a new issue