It says it could't resolve mirrorlist.centos.org, so you have a DNS problem
-- *at least* a DNS problem.  Because this is CentOS, I'd verify that the
primary public interface (probably eth0) is enabled at boot and out from
under network-manager control, particularly if you're running it as a
server and not a desktop.

I'd diagnose the networking issue, and then write a play/role that goes
over the steps to resolving the issue, such that you can reuse the
play/role again and again on CentOS VMs at build time.

As an example, you could use the URI
module<http://docs.ansible.com/uri_module.html>to verify a connection
to
mirrorlist.centos.org before proceeding.


On Sat, Apr 5, 2014 at 2:52 PM, Sean Bigdatafun
<[email protected]>wrote:

>
>
> TASK: [common | yum install epel packages]
> ************************************
>
> failed: [ceph-osd1] => {"changed": true, "item": "", "rc": 1, "results":
> ["Loaded plugins: fastestmirror, security\nDetermining fastest
> mirrors\nCould not retrieve mirrorlist
> http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error
> was\n14: PYCURL ERROR 6 - \"Couldn't resolve host 'mirrorlist.centos.org
> '\"\n"]}
>
> msg: Error: Cannot find a valid baseurl for repo: base
>
> I am running my playbook toward the vagrant vms on my laptop, so maybe my
> home network (bandwidth) caused the problem? I guess this is because I
> pointed to one URL and somehow it timed out (I have not clue).
>
> Is there anyway to make this task more robust? Can yum module put a list
> of repos instead of pointing to a hardcoded URL?
>
>
> ---------------Related tasks in my playbook------------
>
> - name: yum install epel packages
>
>   yum: 
> name=http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
> state=present
>
> ----------------------------------------------------
>
>
>
> failed: [ceph-mon0] => {"changed": true, "item": "", "rc": 1, "results":
> ["Loaded plugins: fastestmirror, security\nDetermining fastest
> mirrors\nCould not retrieve mirrorlist
> http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error
> was\n14: PYCURL ERROR 6 - \"Couldn't resolve host 'mirrorlist.centos.org
> '\"\n"]}
>
> msg: Error: Cannot find a valid baseurl for repo: base
>
>
> failed: [ceph-osd0] => {"changed": true, "item": "", "rc": 1, "results":
> ["Loaded plugins: fastestmirror, security\nDetermining fastest
> mirrors\nCould not retrieve mirrorlist
> http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error
> was\n14: PYCURL ERROR 6 - \"Couldn't resolve host 'mirrorlist.centos.org
> '\"\n"]}
>
> msg: Error: Cannot find a valid baseurl for repo: base
>
> --
> 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/a4cc829b-8502-455f-a682-003bfcab1ff9%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/a4cc829b-8502-455f-a682-003bfcab1ff9%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAK6JQEEu4tk9xuEMvRk_CeQNj1TcOFxkGudpXBYvjmBmGwcz4w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to