# Set the "changed" value when using the raw module

**URL:** <https://forum.ansible.com/t/set-the-changed-value-when-using-the-raw-module/23049>\
**Category:** Ansible Project\
**Created:** [November 17, 2016, 7:18pm UTC](https://forum.ansible.com/t/set-the-changed-value-when-using-the-raw-module/23049 "2016-11-17T19:18:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Justin\_Dugan](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@Justin\_Dugan](https://forum.ansible.com/u/Justin_Dugan)\
**Post date:** [November 17, 2016, 7:18pm UTC](https://forum.ansible.com/t/set-the-changed-value-when-using-the-raw-module/23049/1 "2016-11-17T19:18:04Z")

</div>

Hi all,

I am using the following task in a playbook:

- name: Install .Net 4.6.2  
raw: c:/temp/NDP462-KB3151800-x86-x64-AllOS-ENU.exe /q /norestart  
when: raw\_output.stdout | version\_compare(‘394806’, ‘\<’)  
notify:
- reboot

Everything works with the exception of the “notify”. I’m assuming this is because the “changed” value returned by the raw module is false. Is there a way to force “changed” to be true?

Thanks,

Justin

---

<div class="post-metadata">

**Author:** ![Matt\_Davis](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Matt\_Davis](https://forum.ansible.com/u/Matt_Davis)\
**Post date:** [November 17, 2016, 7:40pm UTC](https://forum.ansible.com/t/set-the-changed-value-when-using-the-raw-module/23049/2 "2016-11-17T19:40:33Z")

</div>

We changed raw in 2.2 to return changed: true for consistency with the other non-idempotent modules (shell/script/command/etc). You can override with changed\_when if you’re not on 2.2 yet.

---

<div class="post-metadata">

**Author:** ![Matt\_Davis](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Matt\_Davis](https://forum.ansible.com/u/Matt_Davis)\
**Post date:** [November 17, 2016, 7:42pm UTC](https://forum.ansible.com/t/set-the-changed-value-when-using-the-raw-module/23049/3 "2016-11-17T19:42:06Z")

</div>

Though for what you’re doing, you should probably use win\_chocolatey or win\_package, as they’ll actually give you idempotency.

---

<div class="post-metadata">

**Author:** ![Justin\_Dugan](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@Justin\_Dugan](https://forum.ansible.com/u/Justin_Dugan)\
**Post date:** [November 17, 2016, 7:52pm UTC](https://forum.ansible.com/t/set-the-changed-value-when-using-the-raw-module/23049/4 "2016-11-17T19:52:23Z")

</div>

Thanks!

I tried win\_chocolatey and it works fine on Win2008; however, on Win2012, it was trying to install patches designed for 2008 and are not applicable for 2012. I also looked into win\_package; however, this module requires a product\_id and on Win2012, .Net 4.6.2 doesn’t show up in “Programs and Features.” It shows up as a “KB” patch instead via “View installed updates.”
