summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Elrod <rick@elrod.me>2020-09-25 18:52:36 -0500
committerRick Elrod <rick@elrod.me>2020-09-26 03:39:08 -0500
commit97c4064b87d0b7859492ebee03955dcf462ebeb4 (patch)
tree014f9a410188d4df125c482d927b6ec5e4aa9011
parent29535446161513273317b4f39bfe3de4ad70f6cd (diff)
downloadansible-97c4064b87d0b7859492ebee03955dcf462ebeb4.tar.gz
[2.8] [tests] uninstall docker stuff for podman
Change: - This isn't a direct backport of #71949 because in stable-2.8, setup_docker doesn't use handlers like more modern branches to clean up after itself. - Instead, here we just make sure the docker packages are gone before the podman test runs. Test Plan: - CI - ci_complete Signed-off-by: Rick Elrod <rick@elrod.me>
-rw-r--r--test/integration/targets/setup_podman/tasks/main.yml12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/integration/targets/setup_podman/tasks/main.yml b/test/integration/targets/setup_podman/tasks/main.yml
index 3b027dba39..8e9c2d16a7 100644
--- a/test/integration/targets/setup_podman/tasks/main.yml
+++ b/test/integration/targets/setup_podman/tasks/main.yml
@@ -5,6 +5,18 @@
- name: Enable extras repo
command: "{{ repo_command[ansible_facts.distribution ~ ansible_facts.distribution_major_version] | default('echo') }}"
+ # In stable-2.8, we have no cleanup handlers for setup_docker.
+ # So here, we just delete the packages, because they conflict with podman.
+ - name: Remove docker packages
+ yum:
+ name:
+ - docker
+ - docker-ce
+ - docker-ce-cli
+ - containerd.io
+ state: absent
+ when: ansible_facts.pkg_mgr in ['yum', 'dnf']
+
- name: Install podman
yum:
name: "{{ podman_package }}"