mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
docker_container: simplify minimal required version per option handling (#47711)
* Store parsed docker-py / docker API versions in client. * Began refactoring 'minimal required version' for docker_container options. * Removing some fake defaults. * Added changelog. * Improve tests (check older docker versions). * Fix comparison. The breaking point is not docker-py 2.0.0, but 1.10.0. (Verified by testing with these versions.) * Move docker-py/API version detection to setup_docker. * Add YAML document starter. * docker_network requirement for docker-py was bumped to 1.10.0 in #47492.
This commit is contained in:
committed by
Will Thames
parent
788247583b
commit
3cca4185be
@@ -1,7 +1,3 @@
|
||||
- name: Check Docker API version
|
||||
command: "{{ ansible_python.executable }} -c 'import docker; print(docker.from_env().version()[\"ApiVersion\"])'"
|
||||
register: docker_api_version
|
||||
ignore_errors: yes
|
||||
|
||||
---
|
||||
- include_tasks: test_docker_config.yml
|
||||
when: docker_api_version.rc == 0 and docker_api_version.stdout is version('1.30', '>=')
|
||||
when: docker_api_version is version('1.30', '>=')
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
---
|
||||
- name: Make sure we're not already using Docker swarm
|
||||
docker_swarm:
|
||||
state: absent
|
||||
|
||||
Reference in New Issue
Block a user