From 2ce326ca5bc2d5ca70c16d24cc0e4d8c175efff5 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Fri, 25 Sep 2020 06:16:38 +0200 Subject: [PATCH] Fix docker test setup. (#957) (#958) (cherry picked from commit cf450e3a4354b215eafe0eb093c4f2019aa8d585) Co-authored-by: Felix Fontein --- .../targets/setup_docker/tasks/Fedora.yml | 6 +++++- .../targets/setup_docker/tasks/RedHat-7.yml | 12 ++++++++---- .../targets/setup_docker/tasks/RedHat-8.yml | 10 +++++++--- .../targets/setup_docker/vars/RedHat-8.yml | 5 ++--- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/tests/integration/targets/setup_docker/tasks/Fedora.yml b/tests/integration/targets/setup_docker/tasks/Fedora.yml index 58a17fbcba..2884837373 100644 --- a/tests/integration/targets/setup_docker/tasks/Fedora.yml +++ b/tests/integration/targets/setup_docker/tasks/Fedora.yml @@ -1,4 +1,9 @@ --- +- name: Import GPG key + rpm_key: + key: https://download.docker.com/linux/fedora/gpg + state: present + - name: Add repository yum_repository: file: docker-ce @@ -7,7 +12,6 @@ baseurl: https://download.docker.com/linux/fedora/{{ 31 if ansible_facts.distribution_major_version|int > 31 else '$releasever' }}/$basearch/stable enabled: yes gpgcheck: yes - gpgkey: https://download.docker.com/linux/fedora/gpg - name: Update cache command: dnf makecache diff --git a/tests/integration/targets/setup_docker/tasks/RedHat-7.yml b/tests/integration/targets/setup_docker/tasks/RedHat-7.yml index d20032bbc0..4fa28b74db 100644 --- a/tests/integration/targets/setup_docker/tasks/RedHat-7.yml +++ b/tests/integration/targets/setup_docker/tasks/RedHat-7.yml @@ -18,10 +18,14 @@ args: warn: no -- name: Add repository - command: yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo - args: - warn: no +# Docker broke their .repo file, so we set it up ourselves +- name: Set-up repository + yum_repository: + name: docker-ce + description: docker-ce + baseurl: https://download.docker.com/linux/centos/{{ ansible_facts.distribution_major_version }}/$basearch/stable + gpgcheck: true + gpgkey: https://download.docker.com/linux/centos/gpg - name: Update cache command: yum -y makecache fast diff --git a/tests/integration/targets/setup_docker/tasks/RedHat-8.yml b/tests/integration/targets/setup_docker/tasks/RedHat-8.yml index 3209443f99..5e8334835c 100644 --- a/tests/integration/targets/setup_docker/tasks/RedHat-8.yml +++ b/tests/integration/targets/setup_docker/tasks/RedHat-8.yml @@ -12,10 +12,14 @@ retries: 10 delay: 2 +# Docker broke their .repo file, so we set it up ourselves - name: Set-up repository - command: dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo - args: - warn: no + yum_repository: + name: docker-ce + description: docker-ce + baseurl: https://download.docker.com/linux/centos/{{ ansible_facts.distribution_major_version }}/$basearch/stable + gpgcheck: true + gpgkey: https://download.docker.com/linux/centos/gpg - name: Install docker dnf: diff --git a/tests/integration/targets/setup_docker/vars/RedHat-8.yml b/tests/integration/targets/setup_docker/vars/RedHat-8.yml index faaad8625f..ff6dcf7b7b 100644 --- a/tests/integration/targets/setup_docker/vars/RedHat-8.yml +++ b/tests/integration/targets/setup_docker/vars/RedHat-8.yml @@ -4,7 +4,6 @@ docker_prereq_packages: - lvm2 - libseccomp -# Docker CE > 3:18.09.1 requires containerd.io >= 1.2.2-3 which is unavaible at this time docker_packages: - - docker-ce-3:18.09.1 - - docker-ce-cli-1:18.09.1 # otherwise 19.03.9 is installed, which won't work with docker daemon 18.09.1 + - docker-ce-19.03.13 + - docker-ce-cli-19.03.13