# Default "changed" state for notification modules

**URL:** <https://forum.ansible.com/t/default-changed-state-for-notification-modules/12806>\
**Category:** Ansible Project\
**Created:** [May 14, 2013, 8:28pm UTC](https://forum.ansible.com/t/default-changed-state-for-notification-modules/12806 "2013-05-14T20:28:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Coddington](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Matt\_Coddington](https://forum.ansible.com/u/Matt_Coddington)\
**Post date:** [May 14, 2013, 8:28pm UTC](https://forum.ansible.com/t/default-changed-state-for-notification-modules/12806/1 "2013-05-14T20:28:05Z")

</div>

Hi all,  
I was looking at all the new notification modules and they generally appear to exit with changed=True. The except is the mail module which exits with changed=false. Initially I was thinking mail should just be updated to exit with changed=true, but now i’m not so sure… I can see an argument to be made that “changed” should represent something that’s actually changing the state on one of your systems, and just sending out an email or a chat notification shouldn’t count as “changing” anything. What do folks think?

matt

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [May 14, 2013, 8:34pm UTC](https://forum.ansible.com/t/default-changed-state-for-notification-modules/12806/2 "2013-05-14T20:34:38Z")

</div>

I made the jabber module returned changed=true when it sends a message,  
because an action was executed (even if the system itself didn't change).

As long as we have a decision on what the standard should be, its easy to  
change them all to conform one way or the other.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [May 14, 2013, 9:45pm UTC](https://forum.ansible.com/t/default-changed-state-for-notification-modules/12806/3 "2013-05-14T21:45:56Z")

</div>

I believe it should not return changed=True, and should also not run in check mode.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [May 14, 2013, 9:59pm UTC](https://forum.ansible.com/t/default-changed-state-for-notification-modules/12806/4 "2013-05-14T21:59:59Z")

</div>

jabber one joins server and even room but doesn't send message in check  
mode, does this work?

I'll patch to return changed=False.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [May 14, 2013, 10:31pm UTC](https://forum.ansible.com/t/default-changed-state-for-notification-modules/12806/5 "2013-05-14T22:31:04Z")

</div>

That sounds reasonable.

I think it shouldn’t post, seeing the message could be about it deploying something.
