delete_old_oci_images: fix the module fail format
Signed-off-by: Clement Verna <cverna@tutanota.com>
This commit is contained in:
parent
8241b508ec
commit
6760916870
1 changed files with 4 additions and 3 deletions
|
@ -100,9 +100,10 @@ def main():
|
||||||
# Get the list of repositories in the registry (Assume we have less than 500)
|
# Get the list of repositories in the registry (Assume we have less than 500)
|
||||||
resp = s.get("{}/v2/_catalog?n=500".format(registry))
|
resp = s.get("{}/v2/_catalog?n=500".format(registry))
|
||||||
if not resp.ok:
|
if not resp.ok:
|
||||||
result["stdout_lines"].append("Failed to get the list of images on the {}".format(registry))
|
module.fail_json(
|
||||||
result["failed"] = True
|
msg="Failed to get the list of images on the {}".format(registry)",
|
||||||
module.fail_json(**result)
|
failed=True
|
||||||
|
)
|
||||||
|
|
||||||
repositories = resp.json().get("repositories")
|
repositories = resp.json().get("repositories")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue