首页 文章

如何在ansible中处理未经验证的apt安装

提问于
浏览
4

从我们自己的repo安装apt软件包时,我在CLI上获得以下内容:

Install these packages without verification? [y/N]

问题是,如何使用ansible成功安装这些软件包?

即使使用force选项,ansible也无法安装包 .

我正在使用的命令是:

- apt: name=coupons-graphite dpkg_options='force' state=present

1 回答

  • 6

    根据documentation for the apt module,你应该在这种情况下使用 force=yes

    - apt: name=coupons-graphite
           state=present
           force=yes
    

相关问题