我只是想告诉Ansible在我的OS X机器上构建一个docker镜像,这是我得到的错误:
$ ansible-playbook main.yml
PLAY [localhost] **************************************************************
GATHERING FACTS ***************************************************************
ok: [localhost]
TASK: [Build docker image from dockerfiles] ***********************************
failed: [localhost] => {"changed": false, "failed": true}
msg: ConnectionError(ProtocolError('Connection aborted.', error(2, 'No such file or directory')),)
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/Users/ronny/main.retry
localhost : ok=1 changed=0 unreachable=0 failed=1
Run Code Online (Sandbox Code Playgroud)
这是我正在使用的main.yml文件:
---
- hosts: localhost
connection: local
tasks:
- name: Build docker image from dockerfiles
docker_image:
name: testimage
path: test
state: build …Run Code Online (Sandbox Code Playgroud)