docker - ansible docker 模块 : unsupported parameter docker_api_version

标签 docker ansible

由于我的机器和目标服务器上的 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/

相关文章:

docker - 在 Ansible 中转义双花括号

amazon-web-services - ECR Lifecycle Tasks标签前缀是否区分大小写?

pip - 使用 "sudo pip install ansible --upgrade"更新 Ansible 版本不会更新核心模块

ansible - 通过 Ansible 查找包含程序的所有 CICS 区域

compilation - 使用 Ansible 编译和安装简单的二进制文件

spring - Docker错误解决了http://es.example/oauth/check_token的POST请求上的主机和I/O错误拒绝连接

docker - docker-compose.yml覆盖删除镜像构建

node.js - 如何使用 google/node-runtime 镜像在 Docker 中运行 Ghost?

python - 即使安装了 Ansible 也无法导入 docker-py

docker - 如何在不重新启动所有服务的情况下更新 docker stack