diff --git a/docs/docsite/rst/dev_guide/developing_modules_general.rst b/docs/docsite/rst/dev_guide/developing_modules_general.rst index 44db07f92b4..8e87bbacbeb 100644 --- a/docs/docsite/rst/dev_guide/developing_modules_general.rst +++ b/docs/docsite/rst/dev_guide/developing_modules_general.rst @@ -64,6 +64,13 @@ Info and facts modules, are just like any other Ansible Module, with a few minor 5. They MUST NOT make any changes to the system. 6. They MUST document the :ref:`return fields` and :ref:`examples`. +You can add your facts into ``ansible_facts`` field of the result as follows: + +.. code-block:: python + + module.exit_json(changed=False, ansible_facts=dict(my_new_fact=value_of_fact)) + + The rest is just like creating a normal module. Verifying your module code