diff --git a/roles/container-engine/docker/tasks/pre-upgrade.yml b/roles/container-engine/docker/tasks/pre-upgrade.yml index 289211ed0..f00229101 100644 --- a/roles/container-engine/docker/tasks/pre-upgrade.yml +++ b/roles/container-engine/docker/tasks/pre-upgrade.yml @@ -1,4 +1,12 @@ --- +- 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 }}'