# Error module package centos

**URL:** <https://forum.ansible.com/t/error-module-package-centos/21008>\
**Category:** Ansible Project\
**Created:** [March 29, 2016, 3:16pm UTC](https://forum.ansible.com/t/error-module-package-centos/21008 "2016-03-29T15:16:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![France\_BERTELOOT](https://avatars.discourse-cdn.com/v4/letter/f/59ef9b/32.png) [@France\_BERTELOOT](https://forum.ansible.com/u/France_BERTELOOT)\
**Post date:** [March 29, 2016, 3:16pm UTC](https://forum.ansible.com/t/error-module-package-centos/21008/1 "2016-03-29T15:16:54Z")

</div>

Hello,

My playbook is in error when I use the package module to install packages in centOS machine. Someone has an idea of the problem?

Ansible version : 2.0.0.1  
OS target machine : CentOS Linux release 7.2

my playbook (extract):

- name: Installing selinux-related packages  
package:  
name: “{{ item }}”  
state: present  
with\_items:
- libselinux-python
- selinux-policy  
when: ansible\_os\_family == “RedHat”

The error message :

failed: [X.X.X.X] =\> (item=[u’libselinux-python’, u’selinux-policy’]) =\> {“failed”: true, “item”: [“libselinux-python”, “selinux-policy”], “module\_stderr”: “”, “module\_stdout”: “Traceback (most recent call last):\r\n File "/root/.ansible/tmp/ansible-tmp-1459263288.84-116454324299460/yum", line 2769, in \r\n main()\r\n File "/root/.ansible/tmp/ansible-tmp-1459263288.84-116454324299460/yum", line 831, in main\r\n disablerepo, disable\_gpg\_check)\r\n File "/root/.ansible/tmp/ansible-tmp-1459263288.84-116454324299460/yum", line 716, in ensure\r\n items = pkgspec.split(‘,’)\r\nAttributeError: ‘list’ object has no attribute ‘split’\r\n”, “msg”: “MODULE FAILURE”, “parsed”: false}

When I connected to the host and I do ‘yum install libselinux-python’, the package is already installed.

France
