Add a task that removes packages from the old distribution method. See https://docs.docker.com/engine/install/ubuntu/
This commit is contained in:
parent
64b0669e21
commit
1a61a27af9
|
@ -4,6 +4,9 @@
|
||||||
#apt_key: keyserver={{ docker_repo_keyserver }} id={{ docker_repo_key }} state=present
|
#apt_key: keyserver={{ docker_repo_keyserver }} id={{ docker_repo_key }} state=present
|
||||||
apt_key: url={{ docker_deb_repo_key_url }} state=present
|
apt_key: url={{ docker_deb_repo_key_url }} state=present
|
||||||
|
|
||||||
|
- name: Remove the old docker packages, from the old distribution method
|
||||||
|
apt: pkg={{ docker_deb_old_packages }} state=absent
|
||||||
|
|
||||||
- name: Remove the obsolete docker repository
|
- name: Remove the obsolete docker repository
|
||||||
apt_repository: repo='{{ docker_deb_repo_old }}' state=absent update_cache=yes
|
apt_repository: repo='{{ docker_deb_repo_old }}' state=absent update_cache=yes
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ py3_env_pip_pkgs:
|
||||||
docker_deb_repo_key_url: 'https://download.docker.com/linux/ubuntu/gpg'
|
docker_deb_repo_key_url: 'https://download.docker.com/linux/ubuntu/gpg'
|
||||||
# Set to the Debian distribution name if not Ubuntu
|
# Set to the Debian distribution name if not Ubuntu
|
||||||
docker_linux_distribution: '{{ ansible_distribution_release | lower }}'
|
docker_linux_distribution: '{{ ansible_distribution_release | lower }}'
|
||||||
docker_deb_repo_old: 'deb https://apt.dockerproject.org/repo {{ ansible_distribution | lower }}-{{ docker_distribution }} main'
|
docker_deb_repo_old: 'deb https://apt.dockerproject.org/repo {{ ansible_distribution | lower }}-17 main'
|
||||||
docker_deb_repo: 'deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable'
|
docker_deb_repo: 'deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable'
|
||||||
|
|
||||||
docker_el_repo: 'https://download.docker.com/linux/centos/docker-ce.repo'
|
docker_el_repo: 'https://download.docker.com/linux/centos/docker-ce.repo'
|
||||||
|
@ -19,6 +19,12 @@ docker_deb_packages:
|
||||||
- docker-ce-cli
|
- docker-ce-cli
|
||||||
- containerd.io
|
- containerd.io
|
||||||
|
|
||||||
|
docker_deb_old_packages:
|
||||||
|
- docker-engine
|
||||||
|
- docker.io
|
||||||
|
- containerd
|
||||||
|
- runc
|
||||||
|
|
||||||
docker_el_packages:
|
docker_el_packages:
|
||||||
- docker-ce
|
- docker-ce
|
||||||
- docker-ce-cli
|
- docker-ce-cli
|
||||||
|
|
Loading…
Reference in New Issue