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!
On Friday, September 26, 2014 11:27:11 AM UTC+2, [email protected] wrote:
>
> 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:
> ---
> -
> hosts: localhost
> remote_user: root
> tasks:
> - name: install mandatory package list
> yum: name={{ item }}, state=present
> with_items:
> - bc
> ...
>
> Ansible raises an error:
> failed: [localhost] => (item=bc) => {"changed": true, "failed": true,
> "item": "bc", "rc": 0, "results": ["Loaded plugins: changelog,
> fastestmirror, kernel-module, protectbase, tsflags,\n :
> versionlock\nLoading mirror speeds from cached hostfile\n54 packages
> excluded due to repository protections\nResolving Dependencies\n--> Running
> transaction check\n---> Package bc.x86_64 0:1.06.95-13.el7 will be
> installed\n--> Finished Dependency Resolution\nBeginning Kernel Module
> Plugin\nFinished Kernel Module Plugin\n\nDependencies
> Resolved\n\n================================================================================\n
>
> Package Arch Version Repository
>
> Size\n================================================================================\nInstalling:\n
>
> bc x86_64 1.06.95-13.el7 base
> 115 k\n\nTransaction
> Summary\n================================================================================\nInstall
>
> 1 Package\n\nTotal download size: 115 k\nInstalled size: 215
> k\nDownloading packages:\nRunning transaction check\nRunning transaction
> test\nTransaction test succeeded\nRunning transaction\n Installing :
> bc-1.06.95-13.el7.x86_64 1/1 \n
> Verifying : bc-1.06.95-13.el7.x86_64
> 1/1 \n\nInstalled:\n bc.x86_64 0:1.06.95-13.el7
> \n\nComplete!\n"]}
> msg: No Package matching '' found available, installed or updated
>
> FATAL: all hosts have already failed -- aborting
>
> Yum has done it's job (bc is actually installed), but Ansible seems to
> want to install an additional package named *''* (nothing), which is
> obviously not present. Is this a bug or did I miss something?
>
>
>
--
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/6668578c-0eed-434e-9ac0-09d96378de1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.