c12s-kubespray/roles/container-engine/docker/tasks/pre-upgrade.yml
Sergey 2798adc837 Remove stale legacy yum docker repo /etc/yum.repos.d/docker.repo (#5569)
* Remove stale legacy yum docker repo /etc/yum.repos.d/docker.repo

* move task 'Remove legacy docker repo file' to pre-upgrade.yml
2020-01-28 02:31:40 -08:00

25 lines
740 B
YAML

---
- 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
- 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