docker_*: enable RHEL8 tests (#53313)

This commit is contained in:
Felix Fontein
2019-03-05 19:50:28 +01:00
committed by Matt Clay
parent 56e3597856
commit 1323dca9e9
21 changed files with 43 additions and 33 deletions

View File

@@ -0,0 +1,25 @@
# The RHEL extras repository must be enabled to provide the container-selinux package.
# See: https://docs.docker.com/engine/installation/linux/docker-ee/rhel/#install-using-the-repository
- name: Install Docker pre-reqs
dnf:
name:
- dnf-utils
- device-mapper-persistent-data
- lvm2
- libseccomp
state: present
- name: Set-up repository
command: dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
- name: Install docker
dnf:
name: docker-ce
state: present
- name: Make sure the docker daemon is running (failure expected inside docker container)
service:
name: docker
state: started
ignore_errors: "{{ ansible_virtualization_type == 'docker' }}"

View File

@@ -2,13 +2,16 @@
is_rhel: "{{ ansible_os_family == 'RedHat' and ansible_distribution != 'Fedora' }}"
is_rhel6: "{{ is_rhel and ansible_distribution_major_version == '6' }}"
is_rhel7: "{{ is_rhel and ansible_distribution_major_version == '7' }}"
is_rhel8: "{{ is_rhel and ansible_distribution_major_version == '8' }}"
block:
- include_tasks: "{{ lookup('first_found', params) }}"
vars:
params:
- '{{ ansible_distribution }}.yml'
- '{{ ansible_os_family }}.yml'
when: not is_rhel6
when: not is_rhel6 and not is_rhel8
- include_tasks: RHEL8.yml
when: is_rhel8
- name: Install Python requirements
vars: