# Able to extract list of installed rpm using "shell" module but not with yum module

**URL:** <https://forum.ansible.com/t/able-to-extract-list-of-installed-rpm-using-shell-module-but-not-with-yum-module/32086>\
**Category:** Ansible Project\
**Created:** [January 29, 2020, 2:05pm UTC](https://forum.ansible.com/t/able-to-extract-list-of-installed-rpm-using-shell-module-but-not-with-yum-module/32086 "2020-01-29T14:05:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pawan\_Kumar1](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@Pawan\_Kumar1](https://forum.ansible.com/u/Pawan_Kumar1)\
**Post date:** [January 29, 2020, 2:05pm UTC](https://forum.ansible.com/t/able-to-extract-list-of-installed-rpm-using-shell-module-but-not-with-yum-module/32086/1 "2020-01-29T14:05:42Z")

</div>

Hi Team,

I am able to extract the selected list of installed rpms using ansible “shell” module ,But when I tried using “yum” module ,it’s no success .  
Your help would be appreciated .

The playbook which is running with “shell” module & it’s output is as follows —

Playbook—

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [January 29, 2020, 2:09pm UTC](https://forum.ansible.com/t/able-to-extract-list-of-installed-rpm-using-shell-module-but-not-with-yum-module/32086/2 "2020-01-29T14:09:10Z")

</div>

> Hi Team,
> 
> I am able to extract the selected list of installed rpms using ansible "shell" module ,But when I tried using "yum"  
> module ,it's no success .  
> Your help would be appreciated .

Hello Pawan,

what's your yum task and the error message you get from the yum module?

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke

---

<div class="post-metadata">

**Author:** ![Pawan\_Kumar1](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@Pawan\_Kumar1](https://forum.ansible.com/u/Pawan_Kumar1)\
**Post date:** [January 29, 2020, 3:54pm UTC](https://forum.ansible.com/t/able-to-extract-list-of-installed-rpm-using-shell-module-but-not-with-yum-module/32086/3 "2020-01-29T15:54:30Z")

</div>



---

<div class="post-metadata">

**Author:** ![Pawan\_Kumar1](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@Pawan\_Kumar1](https://forum.ansible.com/u/Pawan_Kumar1)\
**Post date:** [January 31, 2020, 4:25am UTC](https://forum.ansible.com/t/able-to-extract-list-of-installed-rpm-using-shell-module-but-not-with-yum-module/32086/4 "2020-01-31T04:25:08Z")

</div>

Hi Team,

May i get some response to this issue .  
Hopefully I am able to explain the problem .

warm regards  
Pawan kumar
