Add 'check mode' feature to an existing module

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

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?