geerlingguy/ansible-role-kubernetes

Put a hold on packages

dkirrane opened this issue · 2 comments

My Ubuntu updated the packages.
All packages likely need a hold to avoid surprise upgrades

- name: Prevent kubernetes from being upgraded
  dpkg_selections:
    name: "{{ item }}"
    selection: hold
  loop:
    - kubelet
    - kubectl
    - kubeadm
    - kubernetes-cni

- name: Prevent docker from being upgraded
  dpkg_selections:
    name: "{{ item }}"
    selection: hold
  loop:
    - docker-ce
    - docker-ce-cli
    - docker-ce-rootless-extras
    - containerd.io

rdxmb commented

The package-versions should be pinned by ../templates/apt-preferences-kubernetes.j2
In the past I've rarely had problems with the syntax here. However, there is no problem in my case actually. What ubuntu-version do you run? @dkirrane

Running Ubuntu server 22-04-LTS
I'll close anyways as putting a hold like above works for me