In CentOS 8.x Docker install Step: remove podman when existing (#8016)

pull/8036/head
Peter Pan 2021-09-29 21:32:48 +08:00 committed by GitHub
parent af949cd967
commit f5885d05ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -33,6 +33,10 @@ docker_remove_packages_yum:
- docker-logrotate - docker-logrotate
- docker-engine-selinux.noarch - docker-engine-selinux.noarch
# remove podman to avoid containerd.io confliction
podman_remove_packages_yum:
- podman
docker_remove_packages_apt: docker_remove_packages_apt:
- docker - docker
- docker-engine - docker-engine

View File

@ -15,6 +15,17 @@
- ansible_os_family == 'Debian' - ansible_os_family == 'Debian'
- (docker_versioned_pkg[docker_version | string] is search('docker-ce')) - (docker_versioned_pkg[docker_version | string] is search('docker-ce'))
- name: Ensure podman not installed. | RedHat
package:
name: '{{ podman_remove_packages_yum }}'
state: absent
when:
- ansible_os_family == 'RedHat'
- (docker_versioned_pkg[docker_version | string] is search('docker-ce'))
- not is_ostree
- name: Ensure old versions of Docker are not installed. | RedHat - name: Ensure old versions of Docker are not installed. | RedHat
package: package:
name: '{{ docker_remove_packages_yum }}' name: '{{ docker_remove_packages_yum }}'