由于我的机器和目标服务器上的 Docker API 版本不同,我必须在我的任务中指定版本,如 https://github.com/ansible/ansible-modules-core/issues/705
这是我的任务:
- name: stop the running container
docker:
docker_api_version: 1.13
image: my_image
name: my_container
state: absent
返回错误:
msg: unsupported parameter for module: docker_api_version
我使用的是ansible 1.7.2,参数出现在1.4的文档中http://docs.ansible.com/docker_module.html
最佳答案
docker_api_version
的文档读作“在 Ansible 1.8 中添加”。 (请参阅您链接的页面上的评论部分 http://docs.ansible.com/docker_module.html )
关于docker - ansible docker 模块 : unsupported parameter docker_api_version,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29820857/