I'm facing an issue with an Ansible playbook. Ansible is exiting without giving any proper error message. Here is my code:
- name: Installing dependencies
yum: pkg={{ item }} state=latest
with_items:
- gtk+-devel
- gtk2-devel
I wanted to install above packages in my CentOS7. I'm able to install it manually by giving the command sudo yum install gtk+-devel gtk2-devel
. But Ansible is throwing the below message and exiting from execution:
TASK [server : Installing dependencies] ****************************
ok: [localhost] => (item=[u'gtk+-devel', u'gtk2-devel'])
NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @/Users/rolindroy/ansible/setup.retry
PLAY RECAP *********************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=1
Ansible version: 2.1.2.0
EDIT:
Running the playbook with the -vvv
option yields this error (but I'm able to install it manually):
failed: [localhost] (item=[u'gtk+-devel', u'gtk2-devel']) => {"changed": false, "failed": true, "invocation": {"module_args": {"conf_file": null, "disable_gpg_check": false, "disablerepo": null, "enablerepo": null, "exclude": null, "install_repoquery": true, "list": null, "name": ["gtk+-devel", "gtk2-devel"], "state": "latest", "update_cache": false, "validate_certs": true}, "module_name": "yum"}, "item": ["gtk+-devel", "gtk2-devel"], "msg": "No Package matching 'gtk+-devel' found available, installed or updated", "rc": 0, "results": []}