Help using yum-repository

352 views
Skip to first unread message

Paul Evans

unread,
Jun 5, 2019, 7:04:45 PM6/5/19
to Ansible Project
Trying to install docker-ce. Manually, the commands to do this are:  


Then 

yum install docker-ce -y 

works just fine. To replicate this in a playbook I am using

- name: Set up Docker-ce
  yum_repository:
    name: docker-ce
    description: Set up docker CE repo

- name: Install docker-ce
  yum:
    name: docker-ce

This fails with the following ... 

TASK [docker : Set up Docker-ce] ***********************************************

changed: [awx]


TASK [docker : Install docker-ce] **********************************************

fatal: [awx]: FAILED! => {"changed": false, "msg": "Failure talking to yum: failure: repodata/repomd.xml from docker-ce: [Errno 256] No more mirrors to try.\nhttp://download.docker.com/linux/centos/docker-ce.repo/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found"}

to retry, use: --limit @/Users/paul/learning/ansible/retry/docker.retry


PLAY RECAP *********************************************************************

awx                        : ok=4    changed=2    unreachable=0    failed=1   


Ansible failed to complete successfully. Any error output should be

visible above. Please fix these errors and try again.


Any pointers on what I am doing wrong, greatly appreciated. 


Jonathan Lozada De La Matta

unread,
Jun 5, 2019, 7:08:34 PM6/5/19
to ansible...@googlegroups.com
is the baseurl. You don't point to the .repo file but, the directory that has the repo files.

Jonathan Lozada De La Matta on mobile
 

From: ansible...@googlegroups.com on behalf of Paul Evans <cpev...@gmail.com>
Sent: Wednesday, June 5, 2019 7:05 PM
To: Ansible Project
Subject: [ansible-project] Help using yum-repository
 
--
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/aa685004-62af-4393-9cd4-32f3fd34d342%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages