ansible docker module: unsupported parameter docker_api_version

Because of different Docker API versions on my machine and the target server, I have to specify the version in my task, as for https://github.com/ansible/ansible-modules-core/issues/705

Here’s my task:

  • Why does Docker have a daemon?
  • How to use CloudBees Docker Custom Build Environment Plugin?
  • Why env variables are not created automatically?
  • Can't install supervisor on a Docker container ubuntu:trusty
  • Using SSH keys inside docker container
  • Docker build ADD vs RUN curl
  • - name: stop the running container
      docker: 
        docker_api_version: 1.13
        image: my_image
        name: my_container
        state: absent
    

    returns the error:

    msg: unsupported parameter for module: docker_api_version
    

    I’m using ansible 1.7.2, and the parameter appears in the documentation for 1.4 http://docs.ansible.com/docker_module.html

  • How to enable authentication on MongoDB through Docker?
  • CI and CD implementation issues
  • How to get my docker centos sshd passwordless server running?
  • How to mount host codes to container in docker?
  • Connection refused for Docker application on OSX
  • Can you have a Docker registry with credentials?
  • One Solution collect form web for “ansible docker module: unsupported parameter docker_api_version”

    The documentation for docker_api_version reads “added in Ansible 1.8”. (See comments section on the page you linked http://docs.ansible.com/docker_module.html)

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.