mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
(cherry picked from commit cf450e3a43
)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
90ed2fa5c3
commit
2ce326ca5b
4 changed files with 22 additions and 11 deletions
|
@ -1,4 +1,9 @@
|
|||
---
|
||||
- name: Import GPG key
|
||||
rpm_key:
|
||||
key: https://download.docker.com/linux/fedora/gpg
|
||||
state: present
|
||||
|
||||
- name: Add repository
|
||||
yum_repository:
|
||||
file: docker-ce
|
||||
|
@ -7,7 +12,6 @@
|
|||
baseurl: https://download.docker.com/linux/fedora/{{ 31 if ansible_facts.distribution_major_version|int > 31 else '$releasever' }}/$basearch/stable
|
||||
enabled: yes
|
||||
gpgcheck: yes
|
||||
gpgkey: https://download.docker.com/linux/fedora/gpg
|
||||
|
||||
- name: Update cache
|
||||
command: dnf makecache
|
||||
|
|
|
@ -18,10 +18,14 @@
|
|||
args:
|
||||
warn: no
|
||||
|
||||
- name: Add repository
|
||||
command: yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
|
||||
args:
|
||||
warn: no
|
||||
# Docker broke their .repo file, so we set it up ourselves
|
||||
- name: Set-up repository
|
||||
yum_repository:
|
||||
name: docker-ce
|
||||
description: docker-ce
|
||||
baseurl: https://download.docker.com/linux/centos/{{ ansible_facts.distribution_major_version }}/$basearch/stable
|
||||
gpgcheck: true
|
||||
gpgkey: https://download.docker.com/linux/centos/gpg
|
||||
|
||||
- name: Update cache
|
||||
command: yum -y makecache fast
|
||||
|
|
|
@ -12,10 +12,14 @@
|
|||
retries: 10
|
||||
delay: 2
|
||||
|
||||
# Docker broke their .repo file, so we set it up ourselves
|
||||
- name: Set-up repository
|
||||
command: dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
|
||||
args:
|
||||
warn: no
|
||||
yum_repository:
|
||||
name: docker-ce
|
||||
description: docker-ce
|
||||
baseurl: https://download.docker.com/linux/centos/{{ ansible_facts.distribution_major_version }}/$basearch/stable
|
||||
gpgcheck: true
|
||||
gpgkey: https://download.docker.com/linux/centos/gpg
|
||||
|
||||
- name: Install docker
|
||||
dnf:
|
||||
|
|
|
@ -4,7 +4,6 @@ docker_prereq_packages:
|
|||
- lvm2
|
||||
- libseccomp
|
||||
|
||||
# Docker CE > 3:18.09.1 requires containerd.io >= 1.2.2-3 which is unavaible at this time
|
||||
docker_packages:
|
||||
- docker-ce-3:18.09.1
|
||||
- docker-ce-cli-1:18.09.1 # otherwise 19.03.9 is installed, which won't work with docker daemon 18.09.1
|
||||
- docker-ce-19.03.13
|
||||
- docker-ce-cli-19.03.13
|
||||
|
|
Loading…
Reference in a new issue