Issue
I'm writing my k8s upgrade ansible playbook, and within that I need to do apt-mark unhold kubeadm
. Now, I am trying to avoid using the ansible command
or shell
module to call apt
if possible, but the apt hold/unhold
command does not seem to be supported by neither package
nor apt
modules.
Is it possible to do apt-mark hold
in ansible without command
or shell
?
Solution
You can use the dpkg_selections
module for this.
- name: Hold kubeadm
dpkg_selections:
name: kubeadm
selection: hold
Answered By - Zeitounator