7f93a5a0f5
* use not deprecated ansible_play_hosts variable * Using tests as filters is deprecated * Fix deprecation warning about pkg list
32 lines
816 B
YAML
32 lines
816 B
YAML
---
|
|
- name: Ensure old versions of Docker are not installed. | Debian
|
|
package:
|
|
name: '{{ item }}'
|
|
state: absent
|
|
with_items:
|
|
- docker
|
|
- docker-engine
|
|
- docker.io
|
|
when:
|
|
- ansible_os_family == 'Debian'
|
|
- (docker_versioned_pkg[docker_version | string] is search('docker-ce'))
|
|
|
|
- name: Ensure old versions of Docker are not installed. | RedHat
|
|
package:
|
|
name: '{{ item }}'
|
|
state: absent
|
|
with_items:
|
|
- docker
|
|
- docker-common
|
|
- docker-engine
|
|
- docker-selinux.noarch
|
|
- docker-client
|
|
- docker-client-latest
|
|
- docker-latest
|
|
- docker-latest-logrotate
|
|
- docker-logrotate
|
|
- docker-engine-selinux.noarch
|
|
when:
|
|
- ansible_os_family == 'RedHat'
|
|
- (docker_versioned_pkg[docker_version | string] is search('docker-ce'))
|
|
- not is_atomic
|