Hi all, 

I am using Ansible 1.9.2 on CentOS 6.7. I am designing a system which can 
deploy software onto machines when those machines don't have access to the 
Internet. I basically have an Ansible controller node with cached RPMs and 
a web server. On each target node, I have defined a .repo file to instruct 
each node to fetch the rpms from the web server. 

When I do the deployment, I am finding that the yum module does not work. 

For example, executing the following task fails:

- name: install the MySQL-python package

  yum: disablerepo=* enablerepo=ansible name=MySQL-python


The error message is:


TASK: [icingaweb2 | install the MySQL-python package] 
************************* 

failed: [192.168.50.201] => {"changed": false, "failed": true, "rc": 0, 
"results": []}

msg: No Package matching 'MySQL-python' found available, installed or 
updated


FATAL: all hosts have already failed -- aborting


However if I use the yum command via an Ansible shell, the package is 
installed correctly:


- name: install the MySQL-python package

  shell: yum -y --disablerepo=* --enablerepo=ansible install MySQL-python


I was wondering if I am not using the yum module correctly or if this is an 
Ansible bug. 


Thanks in advance.


Guillaume.


-- 
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/fe3e914c-6e15-4293-8dc0-cea17fbeb276%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to