0

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": []}
freginold
  • 3,946
  • 3
  • 13
  • 28
rolz
  • 591
  • 2
  • 11
  • 23
  • Can you run the playbook with `-vvv` option? – helloV Nov 21 '16 at 16:14
  • @helloV, I'm getting this error message = > '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": []}' – rolz Nov 21 '16 at 16:36
  • But, I'm able to install it manually. – rolz Nov 21 '16 at 16:37
  • Always include ansible version when asking questions. You can use `shell` module for now if it stops your work. Not a solution, but a workaround. – helloV Nov 21 '16 at 16:58

0 Answers0