From 7e71299ee11e422740ff6508a17dbd69035dc073 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Thu, 25 Aug 2016 11:32:49 -0700 Subject: [PATCH] Couple things to watch out for when reviewing facts modules --- docsite/rst/developing_modules.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docsite/rst/developing_modules.rst b/docsite/rst/developing_modules.rst index b212cb588da..d7a5ba7ecb1 100644 --- a/docsite/rst/developing_modules.rst +++ b/docsite/rst/developing_modules.rst @@ -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. * 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. - +* 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 `````````````````````````