mirror of
https://github.com/Maks1mS/ansible-role-docker.git
synced 2024-12-24 00:33:04 +03:00
491fcc972d
Presence of buildah and podman creates dependency issue for runc and makes the role fail
55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
---
|
|
- name: Ensure Podman, Buildah and old versions of Docker are not installed.
|
|
package:
|
|
name:
|
|
- docker
|
|
- docker-common
|
|
- docker-engine
|
|
- podman
|
|
- buildah
|
|
state: absent
|
|
|
|
- name: Add Docker GPG key.
|
|
rpm_key:
|
|
key: "{{ docker_yum_gpg_key }}"
|
|
state: present
|
|
|
|
- name: Add Docker repository.
|
|
get_url:
|
|
url: "{{ docker_yum_repo_url }}"
|
|
dest: '/etc/yum.repos.d/docker-{{ docker_edition }}.repo'
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
|
|
- name: Configure Docker Nightly repo.
|
|
ini_file:
|
|
dest: '/etc/yum.repos.d/docker-{{ docker_edition }}.repo'
|
|
section: 'docker-{{ docker_edition }}-nightly'
|
|
option: enabled
|
|
value: '{{ docker_yum_repo_enable_nightly }}'
|
|
mode: 0644
|
|
no_extra_spaces: true
|
|
|
|
- name: Configure Docker Test repo.
|
|
ini_file:
|
|
dest: '/etc/yum.repos.d/docker-{{ docker_edition }}.repo'
|
|
section: 'docker-{{ docker_edition }}-test'
|
|
option: enabled
|
|
value: '{{ docker_yum_repo_enable_test }}'
|
|
mode: 0644
|
|
no_extra_spaces: true
|
|
|
|
- name: Configure containerd on RHEL 8.
|
|
block:
|
|
- name: Ensure container-selinux is installed.
|
|
package:
|
|
name: container-selinux
|
|
state: present
|
|
|
|
- name: Ensure containerd.io is installed.
|
|
package:
|
|
name: containerd.io
|
|
state: present
|
|
when: ansible_distribution_major_version | int == 8
|