# Add 'check mode' feature to an existing module

**URL:** <https://forum.ansible.com/t/add-check-mode-feature-to-an-existing-module/24902>\
**Category:** Ansible Project\
**Created:** [July 5, 2017, 2:08pm UTC](https://forum.ansible.com/t/add-check-mode-feature-to-an-existing-module/24902 "2017-07-05T14:08:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tom\_Paine1](https://avatars.discourse-cdn.com/v4/letter/t/3da27b/32.png) [@Tom\_Paine1](https://forum.ansible.com/u/Tom_Paine1)\
**Post date:** [July 5, 2017, 2:08pm UTC](https://forum.ansible.com/t/add-check-mode-feature-to-an-existing-module/24902/1 "2017-07-05T14:08:14Z")

</div>

ec2\_elb\_lb does not support ‘check mode’ (Dry run).

I would like to add it to the module.

- Is the below still the preferred way?

[https://groups.google.com/d/topic/ansible-project/v638okDSzvo/discussion](https://groups.google.com/d/topic/ansible-project/v638okDSzvo/discussion)

> add supports\_check\_mode=True to the bottom of the AnsibleModule constructor
> 
> AND
> 
> wherever a module decides to set “changed” = True, and before actually  
> making a change, do something like:
> 
> if self.check\_mode:  
> module.exit\_json(changed=True)

- Are there any templates or examples?
