73db44b00c
* AlmaLinux: ansible>2.9.19 is needed to know about AlmaLinux * AlmaLinux: identify as a centos derrivative * AlmaLinux: add AlmaLinux to checks for CentOS * Use ansible_os_family to compare family and not distribution
25 lines
712 B
YAML
25 lines
712 B
YAML
---
|
|
- name: Remove legacy docker repo file
|
|
file:
|
|
path: "{{ yum_repo_dir }}/docker.repo"
|
|
state: absent
|
|
when:
|
|
- ansible_os_family == 'RedHat'
|
|
- not is_ostree
|
|
|
|
- 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_ostree
|