* `podman_image`: correct `path` parameter description
The `path` parameter is the last parameter when running `podman build
...`. As specified in the manpage, it is defined as the build context,
and not necessarily should it contain the Containerfile.
Signed-off-by: Yuriy Gabuev <yuriy.gabuev@holoplot.com>
* `podman_image`: add `file` parameter for Containerfile location
Add the `file` parameter to `podman_image` module which mirrors the
`--file` command line argument for `podman build ...`. This parameter
specifies the location of the Containerfile to use in case it should be
different from the one contained in the build context directory.
Signed-off-by: Yuriy Gabuev <yuriy.gabuev@holoplot.com>
* `podman_image`: add integration tests for `file` parameter
Add tests to ensure that:
- building from a directory without a Containerfile (or Dockerfile)
fails
- specifying the location of Containerfile with `file` parameter works
Signed-off-by: Yuriy Gabuev <yuriy.gabuev@holoplot.com>
Signed-off-by: Yuriy Gabuev <yuriy.gabuev@holoplot.com>
podman_image module uses 'podman push' command with wrong
flag '--remove_signatures' instead of '--remove-signatures'
This patch fixes the given typo.
Fixes: ansible/ansible#67965
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
with force: true, podman_image would always report changed regardless
of whether or not the pull or build operation resulted in a new image.
With this commit, check the image digest before and after and only
reported changed if the digest is different.