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

View file

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