mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
2ce326ca5b
(cherry picked from commit cf450e3a43
)
Co-authored-by: Felix Fontein <felix@fontein.de>
26 lines
641 B
YAML
26 lines
641 B
YAML
---
|
|
- name: Import GPG key
|
|
rpm_key:
|
|
key: https://download.docker.com/linux/fedora/gpg
|
|
state: present
|
|
|
|
- name: Add repository
|
|
yum_repository:
|
|
file: docker-ce
|
|
name: docker-ce-stable
|
|
description: Docker CE Stable - $basearch
|
|
baseurl: https://download.docker.com/linux/fedora/{{ 31 if ansible_facts.distribution_major_version|int > 31 else '$releasever' }}/$basearch/stable
|
|
enabled: yes
|
|
gpgcheck: yes
|
|
|
|
- name: Update cache
|
|
command: dnf makecache
|
|
args:
|
|
warn: no
|
|
|
|
- name: Install docker
|
|
dnf:
|
|
name: "{{ docker_packages }}"
|
|
state: present
|
|
enablerepo: docker-ce-test
|
|
notify: cleanup docker
|