yum install -y docker-ce-18.09.9-3.el7 还让我确认?怎么规避这个确认

260 天前
 Hopetree

如题,我在脚本中使用 yum 命令安装 docker ,我明明都加了-y ,为啥还是要让我确认?

这个也导致了我使用 ansible 安装的时候也会失败,我的 ansible 编排如下

- name: add docker repo
  shell: yum-config-manager --add-repo {{ docker.repo }}

- name: install docker-ce
  yum: name={{ docker.version }} state=present update_cache=True

请问在 shell 脚本和 ansible 中分别如何避免这个确认的操作?

514 次点击
所在节点    Ansible
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/967700

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX