# idempotency check when state=default

**URL:** <https://forum.ansible.com/t/idempotency-check-when-state-default/18690>\
**Category:** Ansible Developer\
**Created:** [July 6, 2015, 5:33pm UTC](https://forum.ansible.com/t/idempotency-check-when-state-default/18690 "2015-07-06T17:33:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![michael2](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@michael2](https://forum.ansible.com/u/michael2)\
**Post date:** [July 6, 2015, 5:33pm UTC](https://forum.ansible.com/t/idempotency-check-when-state-default/18690/1 "2015-07-06T17:33:09Z")

</div>

Hello,

I am dealing with the devices (network switches) that are idempotent through their API. The devices check whether a proposed config change would alter the current configured state, and if it wouldn’t, then no change is made. We have a custom ‘state=default’ option on the module if a user wants to return to default settings. If state=default in the Ansible module, is it OK to rely on the device for this idempotency check, or must the Ansible module keep track of what a default state looks like and compare the proposed changes to that?

Thanks!  
Michael
