2020-04-10 17:26:24 +02:00
|
|
|
---
|
2020-09-24 23:49:46 +02:00
|
|
|
- name: Import GPG key
|
|
|
|
rpm_key:
|
|
|
|
key: https://download.docker.com/linux/fedora/gpg
|
|
|
|
state: present
|
|
|
|
|
2020-03-09 10:11:07 +01:00
|
|
|
- name: Add repository
|
|
|
|
yum_repository:
|
|
|
|
file: docker-ce
|
|
|
|
name: docker-ce-stable
|
|
|
|
description: Docker CE Stable - $basearch
|
2020-05-15 18:51:49 +02:00
|
|
|
baseurl: https://download.docker.com/linux/fedora/{{ 31 if ansible_facts.distribution_major_version|int > 31 else '$releasever' }}/$basearch/stable
|
2020-03-09 10:11:07 +01:00
|
|
|
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
|