1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-02-04 07:11:49 +00:00
Commit graph

51 commits

Author SHA1 Message Date
Sergey
f2e813671a
Run black -l 120 on all files, again (#943)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-06-26 13:24:44 +03:00
Sergey
4c682e170c
Run black -l 120 on all Python files to unify the style (#939)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-06-15 18:25:48 +03:00
Finn Krein-Schuch
95a7edb26a
Use usedforsecurity for hashlib.sha256 only in python version >=3.9 (#904)
The usedforsecurity keyword argument of the hashlib functions was
introduced in python 3.9. To achieve compatibility with versions below
that, we only use it once it is available.

The usedforsecurity argument forces use of secure hash functions in
specially compiled versions of python. In this case it would force to
upgrade sha256 to a different hash function should sha256 be deemeed
insecure in the future. The podman hash we are comparing against is
(currently) always sha256.

As sha256 is still considered secure, removing this option for older
python versions should be acceptable.
2025-02-17 18:54:36 +02:00
transcaffeine ✨️
14ac4a8045
fix(podman_image): correct intendation on 'loop' keyword (#903)
Signed-off-by: transcaffeine <transcaffeine@finally.coffee>
2025-02-17 15:16:10 +02:00
Guillaume HOUDMON
2deadf069a
Add quadlet file mode option to specify file permission (#867)
* Add quadlet file mode option

Signed-off-by: ghoudmon <guillaume@houdmon.com>

* Fix file mode only change test

Signed-off-by: ghoudmon <guillaume@houdmon.com>

---------

Signed-off-by: ghoudmon <guillaume@houdmon.com>
2024-10-22 15:20:26 +03:00
Sergey
4f8ab01fbb
Fix podman image permissions issue and runlable test (#853)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-09-26 09:50:54 +03:00
jakestec
1f16527350
modify error and docs (#848)
Signed-off-by: Jacob Stec <jacobstec@gmail.com>
2024-09-23 22:38:46 +03:00
SkrrtBacharach
58edc41196
Trigger a new image build when we detect that the Containerfile has changed. (#811)
* Trigger a new image build when we detect that the Containerfile has
changed.

Signed-off-by: gw <gw@bob.lol>

* Fix return type issues from PR feedback

Signed-off-by: gw <gw@bob.lol>

---------

Signed-off-by: gw <gw@bob.lol>
Co-authored-by: gw <gw@bob.lol>
2024-09-23 22:36:33 +03:00
Benjamin MENANT
4973c8639e
fix(podman_image): skip empty volume items (#833)
Signed-off-by: Benjamin Menant <dev@menant-benjamin.fr>
2024-09-03 22:00:19 +03:00
Sergey
622f82a8d9
Fix logic in Podman images (#832)
Fix #831
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-09-03 10:30:17 +03:00
Sergey
7a1d668e0e
Update inspection info about objects in modules (#819)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-08-16 19:26:35 +03:00
Sergey
a7b89ba8fc
Add arch to podman build command explicitly (#805)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-07-15 09:14:28 +03:00
Sergey
c7a2aec93c
Fix CI job for podman_image in push to docker (#785)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-06-13 15:06:44 +03:00
Sergey
e60d54f629
Add option for inline Containerfile in podman_image (#781)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-06-09 14:37:33 +03:00
Sergey
4cb8404b7b
Fix issue with pushing podman image to repo name and org (#771)
If destination doesn't have image, but only repo name and org,
complete with image name and tag.

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-06-02 21:01:06 +03:00
Sergey
4985d48415
Reapply "Fix transports issues in podman_image (#619)" (#754) (#755)
This reverts commit 391e4c54ef.

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-05-29 18:27:07 +03:00
Sergey
b3dc57c1cf
Add autodiscovery for build context in podman_image (#757)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-05-26 00:02:20 +03:00
Sergey
391e4c54ef
Revert "Fix transports issues in podman_image (#619)" (#754)
This reverts commit 7ad3dc53d5.

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-05-22 21:11:23 +03:00
Sergey
7ad3dc53d5
Fix transports issues in podman_image (#619)
Fix #218 #205 #264
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-05-22 20:01:32 +03:00
Sergey
2ae2309cb8
Add extra_args for podman_image push and pull (#752)
* Add extra_args for podman_image push

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>

* Add extra_args to podman pull image

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>

---------

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-05-22 19:50:36 +03:00
Sagi Shnaidman
4bfbabe727 Add more quadlet examples in docs 2024-04-22 21:20:28 +03:00
Sergey
1476ebe685
Add quadlet support for Podman modules (#722)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-04-22 01:13:04 +03:00
Sergey
c3b38b54a9
Catch exceptions when no JSON output in podman_image (#680)
Fix #676
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-11-30 15:12:38 +02:00
Andrew Imeson
18a939a167
Fix typos and spelling errors (#639)
Found with codespell

Signed-off-by: Andrew Imeson <andrew@andrewimeson.com>
2023-09-05 11:30:15 +03:00
Sergey
ba5fa945ef
Add target support for podman build image (#632)
Fix #631
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-08-22 20:54:10 +03:00
Sergey
b91ddd3db7
Fix pulling short image name (#614)
Also return image data when pulling it.
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-08-06 16:39:06 +03:00
Sergey
181de14633
Add stdout to podman build and push actions (#586)
Fix #584
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-05-02 17:54:34 +03:00
nishipy
ab64d5f953
Update podman_image to specify CPU arch when pulling image (#578)
* Add test to sprcify CPU arch when pulling image

Signed-off-by: nishipy <goodisonev4@gmail.com>

* Update to specify CPU arch when pulling image

Signed-off-by: nishipy <goodisonev4@gmail.com>

* Add document for specifying arch

Signed-off-by: nishipy <goodisonev4@gmail.com>

* Fix for idempotency

Signed-off-by: nishipy <goodisonev4@gmail.com>

* Update plugins/modules/podman_image.py

Signed-off-by: nishipy <goodisonev4@gmail.com>

---------

Signed-off-by: nishipy <goodisonev4@gmail.com>
2023-04-15 13:49:16 +03:00
nishipy
e8c270370d
Convert str to json format before evaluating length. (#574)
Signed-off-by: nishipy <goodisonev4@gmail.com>
2023-04-06 13:44:26 +03:00
Sergey
d5f7655464
Support SHA256 tag for podman images (#570)
Fix #569
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-04-03 23:56:11 +03:00
Sergey
0332db2aad
Change yes/no to true/false in the modules (#561)
Fix #560
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-03-08 23:28:52 +02:00
Sergey
a3f8901c4c
Fix docs issues in podman_image (#507)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-11-02 16:56:24 +02:00
Alessandro Re
1fa3dda67b
docs: added simple extra_args example (#493) 2022-11-01 01:15:40 +02:00
Yuriy Gabuev
dbdac4a52b
podman_image: add file parameter for Containerfile location (#492)
* `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>
2022-10-25 17:48:14 +03:00
Sergey
e6544bdd0a
Fix PEP8 issue in podman_image (#459)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-07-31 22:47:17 +03:00
nishipy
acedce8b4b
Update podman_image to remove image with image id (#434)
* Update to remove image with image id.

Signed-off-by: nishipy <goodisonev4@gmail.com>
2022-06-08 18:51:25 +03:00
Sean Sullivan
e90eb325ae
Update error message when pull set to false (#327) 2021-10-19 02:01:52 +03:00
Sergey
b62fb99bae
Fix ansible-test issues for CI (#241) 2021-04-07 10:21:08 +03:00
Sergey
af89807468
Don't calculate image digest in check mode (#214) 2021-03-01 13:21:22 +02:00
Sagi Shnaidman
596aab757f Fix pylint issues for ansible-test 2021-02-11 04:22:04 +02:00
Sagi Shnaidman
d9e392f47e Don't set default for validate-certs in podman_image 2021-01-08 13:02:13 +02:00
Sagi Shnaidman
be87b6859c Add debug log and podman_actions to podman_image 2021-01-08 01:37:15 +02:00
Sergey
fecc0739d6
Fix doc defaults for podman_image (#151) 2020-12-08 12:31:57 +02:00
cfelder
95baa8faae
podman_image: reuse existing results in present() (#109)
* podman_image: reuse existing results in present()
2020-11-08 14:04:44 +02:00
Sergey
3726e2a1c7
Add ubuntu 20.04 to CI as it has podman 2.0.1 version (#83)
Fix idempotency issues in podman_container
Add creating workdir, buildah issue: https://github.com/containers/buildah/issues/2475
Fix #68
Fix #69
Should help to #80 as well, but will be handled separately.
2020-07-16 21:21:17 +03:00
Abhijeet Kasurde
8d44ce919c
sanity: doc fixes (#71)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-07-05 12:11:04 +03:00
Sergey
8b717f9201
Relicense under GPLv3 and clean up modules (#57)
Clean up modules according to last Ansible changes
Set license for GPLv3 to avoid various possible issues
2020-06-08 17:07:16 +03:00
Sergey
6256a082bd
Add option for tls_verify=false for images (#52) 2020-06-01 00:31:55 +03:00
Abhijeet Kasurde
540a92a3ca podman_image: use correct option for remove_signatures flag
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>
2020-04-16 16:59:12 +05:30
Lars Kellogg-Stedman
5d7e5c3a5a podman_image: only set changed=true if there is a new image
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.
2020-03-29 23:25:50 -04:00