Hi,

if I`m looking right, it can be indentation problem,
- yum: name={{ item }} state=present
  with_items:
    - ypbind
    - rpcbind


David Karban
Linux server specialist/Specialista na správu linuxových serverů
www.karban.eu

2015-11-25 18:40 GMT+01:00 Joanna Delaporte <joannadelapo...@gmail.com>:

> Good afternoon, I am attempting to install multiple packages on a CentOS 7
> server. I am using 2.0.0-rc1. I keep running into a python error.
>
> I tried using a yum task in a role, using with_items like so:
>
> - yum: name={{ item }} state=present
>   with_items:
>   - ypbind
>   - rpcbind
>
> I think that is the way it should be done, based on documentation.
> However, I keep getting this error:
>
> failed: [HOSTNAME] => (item=[u'ypbind', u'rpcbind']) => {"failed": true,
> "item": ["ypbind", "rpcbind"], "msg": "Traceback (most recent call
> last):\r\n  File
> \"/tmp/.ansible/ansible-tmp-1448471787.66-61112899447177/yum\", line 2744,
> in <module>\r\n    main()\r\n  File
> \"/tmp/.ansible/ansible-tmp-1448471787.66-61112899447177/yum\", line 833,
> in main\r\n    disablerepo, disable_gpg_check)\r\n  File
> \"/tmp/.ansible/ansible-tmp-1448471787.66-61112899447177/yum\", line 718,
> in ensure\r\n    items = pkgspec.split(',')\r\n*AttributeError: 'list'
> object has no attribute 'split'*\r\n", "parsed": false}
>
>
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/f26bb034-7cfa-48e6-b28a-e3e98551063d%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/f26bb034-7cfa-48e6-b28a-e3e98551063d%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAOBFM97GQqm%2BYC_MWJwCYT%2BcCgbY4M6mLn7%2Bj7Os42PEudmnzg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to