# Is there any Alternative of command/shell module

**URL:** <https://forum.ansible.com/t/is-there-any-alternative-of-command-shell-module/30819>\
**Category:** Ansible Project\
**Created:** [July 19, 2019, 9:40am UTC](https://forum.ansible.com/t/is-there-any-alternative-of-command-shell-module/30819 "2019-07-19T09:40:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rakesh\_Parida](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@Rakesh\_Parida](https://forum.ansible.com/u/Rakesh_Parida)\
**Post date:** [July 19, 2019, 9:40am UTC](https://forum.ansible.com/t/is-there-any-alternative-of-command-shell-module/30819/1 "2019-07-19T09:40:14Z")

</div>

I prepared a playbook as follows:

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [July 19, 2019, 10:18am UTC](https://forum.ansible.com/t/is-there-any-alternative-of-command-shell-module/30819/2 "2019-07-19T10:18:04Z")

</div>

It's not clear what you are trying to do.  
Depending on your use case you could either use fileglob:  
[https://docs.ansible.com/ansible/latest/plugins/lookup/fileglob.html](https://docs.ansible.com/ansible/latest/plugins/lookup/fileglob.html)  
Or if you need to filter on specific permissions etc, use the find  
module: [https://docs.ansible.com/ansible/latest/modules/find\_module.html](https://docs.ansible.com/ansible/latest/modules/find_module.html)

Dick

---

<div class="post-metadata">

**Author:** ![P.Cookson](https://avatars.discourse-cdn.com/v4/letter/p/a6a055/32.png) [@P.Cookson](https://forum.ansible.com/u/P.Cookson)\
**Post date:** [July 19, 2019, 10:24am UTC](https://forum.ansible.com/t/is-there-any-alternative-of-command-shell-module/30819/3 "2019-07-19T10:24:07Z")

</div>

Not really clear why **command** or **shell** doesn’t meet your needs but take a look at **find** , **file** or **stat** perhaps. See full list of modules below:

[https://docs.ansible.com/ansible/latest/modules/list\_of\_all\_modules.html](https://docs.ansible.com/ansible/latest/modules/list_of_all_modules.html)

Regards

Phil
