diff options
Diffstat (limited to 'roles/kubernetes/base/tasks')
-rw-r--r-- | roles/kubernetes/base/tasks/main.yml | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/roles/kubernetes/base/tasks/main.yml b/roles/kubernetes/base/tasks/main.yml index d2f7ef81..614f7685 100644 --- a/roles/kubernetes/base/tasks/main.yml +++ b/roles/kubernetes/base/tasks/main.yml @@ -20,27 +20,26 @@ include_role: name: apt-repo/kubernetes -- name: generate apt pin files for kubelet and cri-tools - loop: - - name: kubelet - version: "{{ kubernetes_version }}-00" - - name: cri-tools - version: "{{ kubernetes_cri_tools_pkg_version }}" - loop_control: - label: "{{ item.name }} == {{ item.version }}" +- name: generate apt pin file for kubelet copy: - dest: "/etc/apt/preferences.d/{{ item.name }}.pref" + dest: "/etc/apt/preferences.d/kubelet.pref" content: | - Package: {{ item.name }} - Pin: version {{ item.version }} + Package: kubelet + Pin: version {{ kubernetes_version }}-* Pin-Priority: 1001 +## TODO: remove once all servers have been converted +- name: remove apt pin file for cri-tools + file: + path: "/etc/apt/preferences.d/cri-tools.pref" + state: absent + - name: install kubelet and common packages apt: name: - bridge-utils - - "cri-tools={{ kubernetes_cri_tools_pkg_version }}" - - "kubelet={{ kubernetes_version }}-00" + - cri-tools + - "kubelet={{ kubernetes_version }}-*" state: present allow_downgrade: yes |