zuul-jobs/roles/ensure-docker/tasks/docker-upstream.yaml
Sorin Sbarnea 9f222677e2 ensure-docker: workaround for centos-8 conflicts
- assured configured repository is based on original repository definition
- workaround for bypassing rpm installation conflicts
  on CentOS/RHEL-8.
- we no longer need special dnf command for installation.

Change-Id: I0b2ccd788f8010b864c45140189dcb215e7c82fb
2020-05-19 19:16:20 +01:00

51 lines
1.4 KiB
YAML

---
- name: Not Implemented
fail:
msg: This set of tasks has not been implemented.
when: ansible_pkg_mgr == 'zypper'
- name: Upstream block
become: true
block:
- name: Set up docker mirrors
include_role:
name: use-docker-mirror
- name: Add all repositories
include_role:
name: ensure-package-repositories
vars:
repositories_keys: "{{ _docker_keys }}"
repositories_list: "{{ _docker_repos }}"
# Workaround for docker-ce installation failure due conflict with containerd.io
# https://bugzilla.redhat.com/show_bug.cgi?id=1756473#c1
- name: Patch docker-ce.repo for newer RedHat distros
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version == '8'
ini_file:
path: /etc/yum.repos.d/docker-ce.repo
section: docker-ce-stable
option: module_hotfixes
value: "True"
no_extra_spaces: true
create: false
- name: Install pre-reqs
package:
name: "{{ _docker_upstream_distro_required_packages }}"
state: present
- name: Remove packages
package:
name: "{{ docker_upstream_distro_remove_packages }}"
state: absent
when: docker_upstream_distro_remove_packages
- name: Install upstream docker using package
package:
name: "{{ docker_upstream_distro_packages }}"
state: present
notify: Restart docker
- include_tasks: docker-setup.yaml