V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Ansible
Ansible Documentation
Hopetree
V2EX  ›  Ansible

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

  •  
  •   Hopetree · 248 天前 · 493 次点击
    这是一个创建于 248 天前的主题,其中的信息可能已经有所发展或是发生改变。

    如题,我在脚本中使用 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 中分别如何避免这个确认的操作?

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2781 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 12:04 · PVG 20:04 · LAX 05:04 · JFK 08:04
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.