2018-03-29 04:10:39 +08:00
|
|
|
---
|
|
|
|
- name: Ensure old versions of Docker are not installed. | Debian
|
|
|
|
package:
|
|
|
|
name: '{{ item }}'
|
|
|
|
state: absent
|
|
|
|
with_items:
|
|
|
|
- docker
|
|
|
|
- docker-engine
|
2018-08-14 17:48:30 +08:00
|
|
|
- docker.io
|
2018-04-06 18:16:05 +08:00
|
|
|
when:
|
|
|
|
- ansible_os_family == 'Debian'
|
2019-02-01 06:57:22 +08:00
|
|
|
- (docker_versioned_pkg[docker_version | string] is search('docker-ce'))
|
2018-03-29 04:10:39 +08:00
|
|
|
|
|
|
|
- name: Ensure old versions of Docker are not installed. | RedHat
|
|
|
|
package:
|
|
|
|
name: '{{ item }}'
|
|
|
|
state: absent
|
|
|
|
with_items:
|
|
|
|
- docker
|
|
|
|
- docker-common
|
|
|
|
- docker-engine
|
2018-10-31 17:16:35 +08:00
|
|
|
- docker-selinux.noarch
|
2018-08-14 17:48:30 +08:00
|
|
|
- docker-client
|
|
|
|
- docker-client-latest
|
|
|
|
- docker-latest
|
|
|
|
- docker-latest-logrotate
|
|
|
|
- docker-logrotate
|
2018-10-31 17:16:35 +08:00
|
|
|
- docker-engine-selinux.noarch
|
2018-04-06 18:16:05 +08:00
|
|
|
when:
|
|
|
|
- ansible_os_family == 'RedHat'
|
2019-02-01 06:57:22 +08:00
|
|
|
- (docker_versioned_pkg[docker_version | string] is search('docker-ce'))
|
2018-04-06 18:16:05 +08:00
|
|
|
- not is_atomic
|