V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
moogle
V2EX  ›  问与答

osx 使用 localhost 调试 docker 模块时如果使用本地 hosts 文件出现错误的问题

  •  
  •   moogle · 2017-05-31 09:50:36 +08:00 · 1354 次点击
    这是一个创建于 2523 天前的主题,其中的信息可能已经有所发展或是发生改变。

    系统为 OSX。

    如果在 playbook 里写 hosts: localhost,不设置 ansible.cfg 和本地的 hosts 文件,就可以正常使用 docker 模块。以下是-vvvv 输出结果:

    changed: [localhost] => {
    
        "ansible_facts": {
        
            "docker_containers": [
            
    省略
    
        "msg": "started 1 container, created 1 container.",
        
        "reload_reasons": null,
        
        "summary": {
    
    省略
    
    }
    

    如果在本地 hosts 文件里写明 localhost ansible_connection=local,就会出现如下问题:

        "msg": "`docker-py` doesn't seem to be installed, but is required for the Ansible Docker module."
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2866 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 14:49 · PVG 22:49 · LAX 07:49 · JFK 10:49
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.