2018-03-28 20:10:39 +00:00
|
|
|
---
|
2020-03-05 10:34:38 +00:00
|
|
|
- name: Remove legacy docker repo file
|
|
|
|
file:
|
|
|
|
path: "{{ yum_repo_dir }}/docker.repo"
|
|
|
|
state: absent
|
|
|
|
when:
|
|
|
|
- ansible_distribution in ["CentOS","RedHat","OracleLinux"]
|
|
|
|
- not is_atomic
|
|
|
|
|
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
|
|
|
|
|
|
|
- name: Ensure old versions of Docker are not installed. | RedHat
|
2019-04-01 22:08:35 +00:00
|
|
|
yum:
|
|
|
|
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'))
|
2018-04-06 10:16:05 +00:00
|
|
|
- not is_atomic
|