2018-03-28 20:10:39 +00:00
|
|
|
---
|
2020-01-28 10:31:40 +00:00
|
|
|
- name: Remove legacy docker repo file
|
|
|
|
file:
|
|
|
|
path: "{{ yum_repo_dir }}/docker.repo"
|
|
|
|
state: absent
|
|
|
|
when:
|
2021-04-23 06:50:03 +00:00
|
|
|
- ansible_os_family == 'RedHat'
|
2020-03-17 10:12:21 +00:00
|
|
|
- not is_ostree
|
2020-01-28 10:31:40 +00:00
|
|
|
|
2018-03-28 20:10:39 +00:00
|
|
|
- name: Ensure old versions of Docker are not installed. | Debian
|
2019-04-01 22:08:35 +00:00
|
|
|
apt:
|
|
|
|
name: '{{ docker_remove_packages_apt }}'
|
2018-03-28 20:10:39 +00:00
|
|
|
state: absent
|
2018-04-06 10:16:05 +00:00
|
|
|
when:
|
|
|
|
- ansible_os_family == 'Debian'
|
2019-01-31 22:57:22 +00:00
|
|
|
- (docker_versioned_pkg[docker_version | string] is search('docker-ce'))
|
2018-03-28 20:10:39 +00:00
|
|
|
|
2021-09-29 13:32:48 +00:00
|
|
|
|
|
|
|
- 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
|
|
|
|
|
|
|
|
|
2018-03-28 20:10:39 +00:00
|
|
|
- name: Ensure old versions of Docker are not installed. | RedHat
|
2021-06-05 11:16:39 +00:00
|
|
|
package:
|
2019-04-01 22:08:35 +00:00
|
|
|
name: '{{ docker_remove_packages_yum }}'
|
2018-03-28 20:10:39 +00:00
|
|
|
state: absent
|
2018-04-06 10:16:05 +00:00
|
|
|
when:
|
|
|
|
- ansible_os_family == 'RedHat'
|
2019-01-31 22:57:22 +00:00
|
|
|
- (docker_versioned_pkg[docker_version | string] is search('docker-ce'))
|
2020-03-17 10:12:21 +00:00
|
|
|
- not is_ostree
|