Error in yum module

28 views
Skip to first unread message

Mario Polario

unread,
Mar 31, 2016, 12:21:39 PM3/31/16
to Ansible Project
Hi!

I installed ansible-1.9.4-1.el7.noarch from EPEL repository on RHEL 7.2.

I have several test servers to manage.

I tried simple playbook:
---
- hosts: webservers
 
  remote_user: root

  tasks:
  - name: install vim
    yum: name=vim state=latest


Trying to execute gives me error:
# ansible-playbook --verbose vim.yml --check

PLAY [webservers] *************************************************************

GATHERING FACTS ***************************************************************
ok: [lvdansk1.vipnet.hr]
ok: [lvdansk2.vipnet.hr]

TASK: [install vim] ***********************************************************
failed: [lvdansk1.vipnet.hr] => {"changed": false, "failed": true, "rc": 0, "results": []}
msg: No Package matching 'vim' found available, installed or updated
failed: [lvdansk2.vipnet.hr] => {"changed": false, "failed": true, "rc": 0, "results": []}
msg: No Package matching 'vim' found available, installed or updated


FATAL: all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
           to retry, use: --limit @/root/vim.retry

lvdansk1.vipnet.hr         : ok=1    changed=0    unreachable=0    failed=1  
lvdansk2.vipnet.hr         : ok=1    changed=0    unreachable=0    failed=1  


Managed nodes can normally install vim via "yum install vim" when done by hand. It does not make sense.

Any idea how to troubleshoot this issue?

Thank you!

Best regards,

Mario.

James Cammarata

unread,
Mar 31, 2016, 10:11:38 PM3/31/16
to ansible...@googlegroups.com
If you run it without check mode enabled, does it install the package?

James Cammarata

Ansible Lead/Sr. Principal Software Engineer
Ansible by Red Hat
twitter: @thejimic, github: jimi-c

--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e2886547-7935-4292-8395-ca762d68ab9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages