ansible - 使用 Ansible 时如何将选项传递给 dnf

标签 ansible centos dnf

通过 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/

相关文章:

bash - 日期 mm/dd/yyyy 中的 sed 模式

linux - CentOS运行后Docker自动停止

python - Centos RPM 与 python 虚拟环境

ansible - 理解 Ansible 的条件表达式

centos - 如何在 RedHat/CentOS 8 的包组中列出所有具有依赖关系的包

linux - 无法在 Centos 8 上安装回 yum

c++ - 如何为 Fedora 安装 g++?

dictionary - ansible with_dict 在提供 set_fact 变量时失败

ansible - 如何将标签应用于 Ansible 任务文件中的每个命令?

Ansible:如何从列表字典中提取值