通过 Ansible 的 dnf
安装软件包时模块。如何传递 --nobest
之类的选项至dnf
?有没有使用原始 shell 命令的替代方法。
最佳答案
我遇到了类似的问题(但我正在使用 yum 包管理器)并想办法解决 here
The issue is that docker-ce has not been packaged for CentOS 8 yet.
An ugly workaround is to install containerd.io manually beforehand:
pre_tasks:
- yum:
name: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
因此,尝试将完整的包 url 设置为包名,它肯定可以工作。
关于ansible - 使用 Ansible 时如何将选项传递给 dnf,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60950124/