5d5c9cab19
Both the `yum` and `apt` modules support a list as input, this allows us avoid the slower `with_items` approach, which can take a long time with a large count of cluster nodes.
17 lines
539 B
YAML
17 lines
539 B
YAML
---
|
|
- name: Ensure old versions of Docker are not installed. | Debian
|
|
apt:
|
|
name: '{{ docker_remove_packages_apt }}'
|
|
state: absent
|
|
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
|
|
yum:
|
|
name: '{{ docker_remove_packages_yum }}'
|
|
state: absent
|
|
when:
|
|
- ansible_os_family == 'RedHat'
|
|
- (docker_versioned_pkg[docker_version | string] is search('docker-ce'))
|
|
- not is_atomic
|