docker_image: do not crash in load_image for docker-py < 2.5.0. (#73)

* Avoid crash for docker-py < 2.5.0.

* Add warnings when load_image does not return a generator.

* Add test.

* Update plugins/modules/docker_image.py

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
This commit is contained in:
Felix Fontein
2021-01-25 15:17:04 +01:00
committed by GitHub
parent c1e6c2e699
commit 8702713ac3
3 changed files with 60 additions and 20 deletions
@@ -0,0 +1,2 @@
bugfixes:
- "docker_image - fix crash on loading images with versions of Docker SDK for Python before 2.5.0 (https://github.com/ansible-collections/community.docker/issues/72, https://github.com/ansible-collections/community.docker/pull/73)."