# https://github.com/ansible/ansible/issues/41263 still issue on version 2.9.1

**URL:** <https://forum.ansible.com/t/https-github-com-ansible-ansible-issues-41263-still-issue-on-version-2-9-1/31744>\
**Category:** Ansible Project\
**Created:** [November 28, 2019, 1:59pm UTC](https://forum.ansible.com/t/https-github-com-ansible-ansible-issues-41263-still-issue-on-version-2-9-1/31744 "2019-11-28T13:59:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![claudio\_p](https://avatars.discourse-cdn.com/v4/letter/c/e480ec/32.png) [@claudio\_p](https://forum.ansible.com/u/claudio_p)\
**Post date:** [November 28, 2019, 1:59pm UTC](https://forum.ansible.com/t/https-github-com-ansible-ansible-issues-41263-still-issue-on-version-2-9-1/31744/1 "2019-11-28T13:59:13Z")

</div>

Running simple shell commands now produces CHANGED instead of SUCCESS.

`ansible --version ansible 2.9.1 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/myuser/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.7/site-packages/ansible executable location = /usr/bin/ansible python version = 3.7.5 (default, Oct 17 2019, 12:09:47) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)]`

`  
ansible db\_server -m shell -a “grep innodb\_log\_file\_size /etc/my.cnf” -k  
SSH password:  
[db01.server.com](http://db01.server.com) | CHANGED | rc=0 \>\>  
innodb\_log\_file\_size=512M

[db02.server.com](http://db02.server.com) | CHANGED | rc=0 \>\>  
innodb\_log\_file\_size=512M

`

Same issue posted : [https://github.com/ansible/ansible/issues/41263](https://github.com/ansible/ansible/issues/41263)

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [November 28, 2019, 7:40pm UTC](https://forum.ansible.com/t/https-github-com-ansible-ansible-issues-41263-still-issue-on-version-2-9-1/31744/2 "2019-11-28T19:40:58Z")

</div>

Hi,

> Running simple shell commands now produces CHANGED instead of SUCCESS.

"now" has been for quite a while now. And as you can read in  
[https://github.com/ansible/ansible/issues/41263](https://github.com/ansible/ansible/issues/41263), this is not a bug, but  
the expected behavior. Reporting success instead of changed was a bug.

If you want a `shell` or `command` task to not result in changed,  
simply add `changed_when: false` to the task (not to the module  
arguments, but at the same level as `shell` or `command`). See  
[https://docs.ansible.com/ansible/latest/user\_guide/playbooks\_error\_handling.html#overriding-the-changed-result](https://docs.ansible.com/ansible/latest/user_guide/playbooks_error_handling.html#overriding-the-changed-result)  
for details.

Cheers,  
Felix

---

<div class="post-metadata">

**Author:** ![claudio\_p](https://avatars.discourse-cdn.com/v4/letter/c/e480ec/32.png) [@claudio\_p](https://forum.ansible.com/u/claudio_p)\
**Post date:** [December 1, 2019, 11:09pm UTC](https://forum.ansible.com/t/https-github-com-ansible-ansible-issues-41263-still-issue-on-version-2-9-1/31744/3 "2019-12-01T23:09:53Z")

</div>

thank you for answer ,

is it possible to use `changed_when: false` on ad-hoc command mode ?
