Adjust push detection to Docker 29.

This commit is contained in:
Felix Fontein 2025-11-15 18:30:36 +01:00
parent 3204def50c
commit c6a4ba25cf
3 changed files with 4 additions and 2 deletions

View File

@ -0,0 +1,2 @@
bugfixes:
- "docker_image, docker_image_push - adjust image push detection to Docker 29 (https://github.com/ansible-collections/community.docker/pull/1199)."

View File

@ -803,7 +803,7 @@ class ImageManager(DockerBaseClass):
if line.get("errorDetail"):
raise RuntimeError(line["errorDetail"]["message"])
status = line.get("status")
if status == "Pushing":
if status in ("Pushing", "Pushed"):
changed = True
self.results["changed"] = changed
except Exception as exc: # pylint: disable=broad-exception-caught

View File

@ -159,7 +159,7 @@ class ImagePusher(DockerBaseClass):
if line.get("errorDetail"):
raise RuntimeError(line["errorDetail"]["message"])
status = line.get("status")
if status == "Pushing":
if status in ("Pushing", "Pushed"):
results["changed"] = True
except Exception as exc: # pylint: disable=broad-exception-caught
if "unauthorized" in str(exc):