# yum groupinstall failed with "with\_items"

**URL:** <https://forum.ansible.com/t/yum-groupinstall-failed-with-with-items/28064>\
**Category:** Ansible Project\
**Created:** [July 17, 2018, 12:35am UTC](https://forum.ansible.com/t/yum-groupinstall-failed-with-with-items/28064 "2018-07-17T00:35:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Imam\_Toufique](https://avatars.discourse-cdn.com/v4/letter/i/71e660/32.png) [@Imam\_Toufique](https://forum.ansible.com/u/Imam_Toufique)\
**Post date:** [July 17, 2018, 12:35am UTC](https://forum.ansible.com/t/yum-groupinstall-failed-with-with-items/28064/1 "2018-07-17T00:35:44Z")

</div>

Hi,

I am having a bit of trouble understanding why the yum module is not working when I use “with\_items”. I am using ansible 2.5.4

So, here is what works:

`

- name: Install Yum Group Packages in Login Nodes  
yum: “name=‘@X Window System’ state=present”  
when: inventory\_hostname in groups[‘hpc-login’]  
`

the above will install ‘X Window System’ , no issues.

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [July 17, 2018, 11:51am UTC](https://forum.ansible.com/t/yum-groupinstall-failed-with-with-items/28064/2 "2018-07-17T11:51:46Z")

</div>

It's looking for '@X Window System' and not @X Window System.

So remove one of the quotes in group\_packages.  
(I guess it will work fine if you remove all quotes from group\_packages too.)
