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 <module>\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

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/25ad51bc-3041-430a-bf73-aa93d643b984%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to