summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClement Verna <cverna@tutanota.com>2019-06-04 13:08:02 +0200
committerClement Verna <cverna@tutanota.com>2019-06-04 13:08:02 +0200
commit6760916870304c2702ece9f1c0d88177f56e46c2 (patch)
treeccac552aa9653f436818d8ec4742d114bc9ebb9e
parent8241b508ecb1af549e158c7784bd76f64b70ef79 (diff)
downloadansible-6760916870304c2702ece9f1c0d88177f56e46c2.zip
ansible-6760916870304c2702ece9f1c0d88177f56e46c2.tar.gz
ansible-6760916870304c2702ece9f1c0d88177f56e46c2.tar.xz
delete_old_oci_images: fix the module fail format
Signed-off-by: Clement Verna <cverna@tutanota.com>
-rw-r--r--library/delete_old_oci_images.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/library/delete_old_oci_images.py b/library/delete_old_oci_images.py
index c906797..cb5cd16 100644
--- a/library/delete_old_oci_images.py
+++ b/library/delete_old_oci_images.py
@@ -100,9 +100,10 @@ def main():
# Get the list of repositories in the registry (Assume we have less than 500)
resp = s.get("{}/v2/_catalog?n=500".format(registry))
if not resp.ok:
- result["stdout_lines"].append("Failed to get the list of images on the {}".format(registry))
- result["failed"] = True
- module.fail_json(**result)
+ module.fail_json(
+ msg="Failed to get the list of images on the {}".format(registry)",
+ failed=True
+ )
repositories = resp.json().get("repositories")