From 0d78d9813ac487d6be1089094bc845b6c2c37b73 Mon Sep 17 00:00:00 2001 From: Jacob Stec Date: Mon, 23 Sep 2024 12:57:58 -0400 Subject: [PATCH] modify error and docs --- docs/podman_image_module.html | 10 +++++----- plugins/modules/podman_image.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/podman_image_module.html b/docs/podman_image_module.html index ec22525b..c75c91b4 100644 --- a/docs/podman_image_module.html +++ b/docs/podman_image_module.html @@ -488,7 +488,7 @@

Examples path: /path/to/build/dir push: true push_args: - dest: quay.io/acme + dest: quay.io/acme/nginx - name: Build and push an image using an auth file containers.podman.podman_image: @@ -496,7 +496,7 @@

Examples push: true auth_file: /etc/containers/auth.json push_args: - dest: quay.io/acme + dest: quay.io/acme/nginx - name: Build and push an image using username and password containers.podman.podman_image: @@ -505,7 +505,7 @@

Examples username: bugs password: "{{ vault_registry_password }}" push_args: - dest: quay.io/acme + dest: quay.io/acme/nginx - name: Build and push an image to multiple registries containers.podman.podman_image: @@ -529,11 +529,11 @@

Examples loop: - name: nginx tag: 4 - dest: docker.io/acme + dest: docker.io/acme/nginx:4 - name: nginx tag: 3 - dest: docker.io/acme + dest: docker.io/acme/nginx:3 - name: Pull an image for a specific CPU architecture containers.podman.podman_image: diff --git a/plugins/modules/podman_image.py b/plugins/modules/podman_image.py index 052d7fb3..9e9fb4b7 100644 --- a/plugins/modules/podman_image.py +++ b/plugins/modules/podman_image.py @@ -794,7 +794,7 @@ def push_image(self): dest_string = dest.rstrip("/") + "/" + self.image_name if "/" not in dest_string and "@" not in dest_string and "docker-daemon" not in dest_string: - self.module.fail_json(msg="Destination must be a full URL or path to a directory.") + self.module.fail_json(msg="Destination must be a full URL or path to a directory with image name and tag.") args.append(dest_string) self.module.log("PODMAN-IMAGE-DEBUG: Pushing image {image_name} to {dest_string}".format(