# command/shell module warn deprecation

**URL:** <https://forum.ansible.com/t/command-shell-module-warn-deprecation/38218>\
**Category:** Ansible Project\
**Created:** [July 12, 2023, 3:30pm UTC](https://forum.ansible.com/t/command-shell-module-warn-deprecation/38218 "2023-07-12T15:30:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcpetro](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@jcpetro](https://forum.ansible.com/u/jcpetro)\
**Post date:** [July 12, 2023, 3:30pm UTC](https://forum.ansible.com/t/command-shell-module-warn-deprecation/38218/1 "2023-07-12T15:30:10Z")

</div>

Good Morning,  
I manage the building of some virtual machine templates using packer. I am leveraging ansible as part of this, and when I am doing some cleanup after the setup is done to prepare for the conversion to template, and a couple of the options I need in yum/dnf, etc don’t exist in the module don’t exist. So, to get around this, I am using the command module, but I get a warning that I should use the module, but that if I am doing it for a specific reason, I should use warn: false or set the option to ignore warnings in my ansible.cfg. Since I am using a “ansible\_local” provisioner in packer, I don’t use an ansible.cfg, so I was wondering if there is another way to accomplish the warn: false option since it has been removed in the more recent versions of ansible.

–John

---

<div class="post-metadata">

**Author:** ![Walter\_Rowe](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/walter_rowe/32/4506_2.png) [@Walter\_Rowe](https://forum.ansible.com/u/Walter_Rowe)\
**Post date:** [July 12, 2023, 3:39pm UTC](https://forum.ansible.com/t/command-shell-module-warn-deprecation/38218/2 "2023-07-12T15:39:27Z")

</div>

I think you can place an ansible.cfg file in the folder where your ansible is running. We do this for our packer image management service that also uses ansible in the provisioner stage.

Walter

---

<div class="post-metadata">

**Author:** ![jcpetro](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@jcpetro](https://forum.ansible.com/u/jcpetro)\
**Post date:** [July 12, 2023, 3:42pm UTC](https://forum.ansible.com/t/command-shell-module-warn-deprecation/38218/3 "2023-07-12T15:42:03Z")

</div>

yeah, I saw that, and I might go down that road, but wanted to see if there was a better way first.

–jp
