gpt4 book ai didi

ansible - `` apt-mark hold `` 和 `` apt-mark unhold `` with ansible modules

转载 作者:行者123 更新时间:2023-12-03 16:53:09 35 4
gpt4 key购买 nike

我正在编写我的 k8s 升级 ansible 剧本,其中我需要做 apt-mark unhold kubeadm .现在,我试图避免使用 ansible commandshell调用模块apt如果可能,但 apt hold/unhold package 似乎都不支持命令也不是 apt模块。
有没有可能做apt-mark hold在没有 command 的情况下或 shell ?

最佳答案

您可以使用 dpkg_selections module为了这。

- name: Hold kubeadm
dpkg_selections:
name: kubeadm
selection: hold

关于ansible - `` apt-mark hold `` 和 `` apt-mark unhold `` with ansible modules,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63982903/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com