Add 'check mode' feature to an existing module

16 views
Skip to first unread message

Tom Paine

unread,
Jul 5, 2017, 10:08:14 AM7/5/17
to Ansible Project
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?


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?
Reply all
Reply to author
Forward
0 new messages