From 1f16527350a24ef4e621e57603a1a8b45721eac3 Mon Sep 17 00:00:00 2001 From: jakestec Date: Mon, 23 Sep 2024 15:38:46 -0400 Subject: [PATCH] modify error and docs (#848) Signed-off-by: Jacob Stec --- 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 ec22525..c75c91b 100644 --- a/docs/podman_image_module.html +++ b/docs/podman_image_module.html @@ -488,7 +488,7 @@ To check whether it is installed, run 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 @@ To check whether it is installed, run 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 @@ To check whether it is installed, run 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 @@ To check whether it is installed, run 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 79d1416..adcf1fd 100644 --- a/plugins/modules/podman_image.py +++ b/plugins/modules/podman_image.py @@ -885,7 +885,7 @@ class PodmanImageManager(object): 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(