# Problem on yum module on CentOS 7

**URL:** <https://forum.ansible.com/t/problem-on-yum-module-on-centos-7/16356>\
**Category:** Ansible Project\
**Created:** [September 26, 2014, 9:27am UTC](https://forum.ansible.com/t/problem-on-yum-module-on-centos-7/16356 "2014-09-26T09:27:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zorggy01](https://avatars.discourse-cdn.com/v4/letter/z/76d3ee/32.png) [@zorggy01](https://forum.ansible.com/u/zorggy01)\
**Post date:** [September 26, 2014, 9:27am UTC](https://forum.ansible.com/t/problem-on-yum-module-on-centos-7/16356/1 "2014-09-26T09:27:11Z")

</div>

Hello,

I’m testing Ansible (version 1.7.1-1) on CentOS 7. Installation is minimalist then I need to install additional packages. Here is the playbook:

`

---

<div class="post-metadata">

**Author:** ![Mark\_Maas](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@Mark\_Maas](https://forum.ansible.com/u/Mark_Maas)\
**Post date:** [September 26, 2014, 10:55am UTC](https://forum.ansible.com/t/problem-on-yum-module-on-centos-7/16356/2 "2014-09-26T10:55:04Z")

</div>

I think it’s because of the comma behind the }} ?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [September 26, 2014, 12:24pm UTC](https://forum.ansible.com/t/problem-on-yum-module-on-centos-7/16356/3 "2014-09-26T12:24:46Z")

</div>

Yes, take out out the comma.

---

<div class="post-metadata">

**Author:** ![zorggy01](https://avatars.discourse-cdn.com/v4/letter/z/76d3ee/32.png) [@zorggy01](https://forum.ansible.com/u/zorggy01)\
**Post date:** [September 26, 2014, 12:47pm UTC](https://forum.ansible.com/t/problem-on-yum-module-on-centos-7/16356/4 "2014-09-26T12:47:12Z")

</div>

Thank you very much, without the comma it works perfectly.

However it was not the exact case, I simplified to extract just what was wrong. In fact I’m using a role and get the same error:

`

---

<div class="post-metadata">

**Author:** ![zorggy01](https://avatars.discourse-cdn.com/v4/letter/z/76d3ee/32.png) [@zorggy01](https://forum.ansible.com/u/zorggy01)\
**Post date:** [September 26, 2014, 12:54pm UTC](https://forum.ansible.com/t/problem-on-yum-module-on-centos-7/16356/5 "2014-09-26T12:54:32Z")

</div>

Oops, I’ve finally found the error: it was deeper, in the task of the installation role:

`

- name: install mandatory package list  
yum: name={{ item }}, state=present  
with\_items: packages

`

You see, in second line, there is a comma that should not be there! Removing it solves the difficulty. Thank you very much again!
