use dpkg_selections module to hold docker-ce on Debian family hosts (#4820)

* use dpkg_selections module to hold docker-ce on Debian family hosts

* removed debian_docker.j2 template as it is no longer required
This commit is contained in:
Scott Charron 2019-06-06 04:16:13 -04:00 committed by Kubernetes Prow Robot
parent c7f6ed1495
commit bbdc6210f5
2 changed files with 5 additions and 10 deletions

View file

@ -192,13 +192,11 @@
- ansible_distribution == 'Ubuntu'
# This is required to ensure any apt upgrade will not break kubernetes
- name: Set docker pin priority to apt_preferences on Debian family
template:
src: "apt_preferences.d/debian_docker.j2"
dest: "/etc/apt/preferences.d/docker"
owner: "root"
mode: 0644
when: not (ansible_os_family in ["CoreOS", "Container Linux by CoreOS", "ClearLinux", "RedHat", "Suse"] or is_atomic)
- name: Tell Debian hosts not to change the docker version with apt upgrade
dpkg_selections:
name: docker-ce
selection: hold
when: ansible_os_family in ["Debian"]
- name: ensure docker started, remove our config if docker start failed and try again
block:

View file

@ -1,3 +0,0 @@
Package: docker-ce
Pin: version {{ docker_version }}.*
Pin-Priority: 1001