docker modules: make sure everything works with older docker-py versions (#55258)

* General test improvements.

* Adjust tests to older docker-py versions.

* docker_swarm_server_info: work around problems with older docker-py versions

* Bump minimal docker-py version for options network_filters and disk_usage.

* More general test improvements.

* Correct usage of docker_image.

* Put files into output directory.

* Speed up test.

* Remove old check.
This commit is contained in:
Felix Fontein
2019-04-17 19:50:57 +02:00
committed by ansibot
parent 24b44e1772
commit 12d26eceb1
20 changed files with 119 additions and 40 deletions

View File

@@ -46,21 +46,24 @@
- name: Tag image with alias
docker_image:
source: local
name: "hello-world:latest"
repository: "hello-world:alias"
register: tag_1
- name: Tag image with alias (idempotent)
docker_image:
source: local
name: "hello-world:latest"
repository: "hello-world:alias"
register: tag_2
- name: Tag image with alias (force, still idempotent)
docker_image:
source: local
name: "hello-world:latest"
repository: "hello-world:alias"
force: yes
force_tag: yes
register: tag_3
- assert:
@@ -105,7 +108,8 @@
name: "hello-world:latest"
repository: "{{ registry_address }}/test/hello-world"
push: yes
force: yes
source: local
force_tag: yes
register: push_3
- assert: