# How to document support for check mode for a module

**URL:** <https://forum.ansible.com/t/how-to-document-support-for-check-mode-for-a-module/35317>\
**Category:** Ansible Developer\
**Created:** [June 9, 2021, 11:04am UTC](https://forum.ansible.com/t/how-to-document-support-for-check-mode-for-a-module/35317 "2021-06-09T11:04:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andreas\_Maier](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@Andreas\_Maier](https://forum.ansible.com/u/Andreas_Maier)\
**Post date:** [June 9, 2021, 11:04am UTC](https://forum.ansible.com/t/how-to-document-support-for-check-mode-for-a-module/35317/1 "2021-06-09T11:04:01Z")

</div>

Hi,  
I am an author of Ansible modules (e.g. [https://github.com/zhmcclient/zhmc-ansible-modules](https://github.com/zhmcclient/zhmc-ansible-modules)) and would like to document whether a module supports check mode.

In modules written in Python, the module declares that at run time, e.g.

module = AnsibleModule(  
argument\_spec=argument\_spec,  
supports\_check\_mode=True)

but there is no corresponding declaration in the module DOCUMENTATION string (that I know of). Also, I do not know of a way to access that runtime declaration in the docs template that is used by the ansible doc extractor tool.

My question is: Is there a recommendation on how to document whether a module supports check mode?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [June 9, 2021, 5:40pm UTC](https://forum.ansible.com/t/how-to-document-support-for-check-mode-for-a-module/35317/2 "2021-06-09T17:40:24Z")

</div>

Just added this for 2.12 (still not final)  
[https://github.com/ansible/ansible/pull/73707](https://github.com/ansible/ansible/pull/73707)

Also see [https://github.com/ansible/ansible/pull/74331](https://github.com/ansible/ansible/pull/74331)

---

<div class="post-metadata">

**Author:** ![Andreas\_Maier](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@Andreas\_Maier](https://forum.ansible.com/u/Andreas_Maier)\
**Post date:** [June 10, 2021, 3:59am UTC](https://forum.ansible.com/t/how-to-document-support-for-check-mode-for-a-module/35317/3 "2021-06-10T03:59:34Z")

</div>

This is what i was looking for. Thanks much!!

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [June 10, 2021, 7:11am UTC](https://forum.ansible.com/t/how-to-document-support-for-check-mode-for-a-module/35317/4 "2021-06-10T07:11:21Z")

</div>

Hi,

the common way to document this (that will also work with already  
released ansible-core/base/ versions) is to add an entry to `notes:`  
which says `Supports C(check_mode).` or something like that.

Cheers,  
Felix
