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

576 commits

Author SHA1 Message Date
Sagi Shnaidman
f2dcda6a1d Remove unnecessary quotes in podman_container_exec module
Fix #714
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-02-28 17:55:19 +02:00
Sagi Shnaidman
de490b8b37 Fix wrong return data type in podman_image_info
Fix #689
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-02-19 15:08:52 +02:00
Sagi Shnaidman
90ac7e19ac Return data for podman exec module
And add "executable" parameter to be aligned with other modules
Fix #711
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-02-18 18:41:14 +02:00
Sagi Shnaidman
a4df896bae CI - add parametrized executables to tests
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-02-18 13:13:57 +02:00
Sagi Shnaidman
129710a383 Fix broken info of pods in Podman v5
Fixing issue from:
https://github.com/containers/podman/pull/21514
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-02-18 13:13:57 +02:00
Sagi Shnaidman
aa6a1215cd CI - add custom podman path to tasks
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-02-18 13:13:57 +02:00
Sagi Shnaidman
42f10519ec Fix podman pod v5 broken info issue
Fix breakig change introduced in Podman v5:
 https://github.com/containers/podman/pull/21514
Related-to: #712

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-02-18 00:01:09 +02:00
Sagi Shnaidman
5e15993783 Fix rootfs test in CI
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-02-18 00:01:09 +02:00
Adam Williamson
7d7445d29b
podman pod info: handle return being list in Podman 5 (#713)
Fixes #712

Podman 5 changed the output of `podman pod info` (when run on a
single pod) from being a dict to being a list of dicts:

https://github.com/containers/podman/pull/21514

this should handle both ways. Unfortunately not sure how to add
a test for this as I can't see a unit test that mocks the output
of the command, only the integration test that gets real live
output, and I'm not sure how to get that test run with Podman 5.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-02-17 21:47:19 +02:00
Dan Campbell
efbfba7c3c
Fix broken example for podman_generate_systemd (#708)
Change the postgres_local example to use the scope of "user" so
the unit file saved to ~/.config/systemd/user/ will be used by systemd.

Signed-off-by: Dan Campbell <dan@compiledworks.com>
2024-02-04 11:58:28 +02:00
Sergey
7031de6a6b
Release 1.12.0 version (#707)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-01-30 21:26:51 +02:00
Sergey
da420f96d9
Add secrets info module (#706)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-01-29 00:14:51 +02:00
Sergey
81209c9a2d
Add tests for env files (#705)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-01-27 22:57:55 +02:00
ant-bl
2e661d1700
Update env_file to accept a list of files instead of a single file (#702)
* Update env_file to accept a list of files instead of a single file

Signed-off-by: antoine <antoine.blin@gandi.net>

* Update doc: add alias env_files

Signed-off-by: antoine <antoine.blin@gandi.net>

* Update plugins/module_utils/podman/podman_container_lib.py

Use real arg name and not alias

Co-authored-by: Sergey <6213510+sshnaidm@users.noreply.github.com>

---------

Signed-off-by: antoine <antoine.blin@gandi.net>
Co-authored-by: Sergey <6213510+sshnaidm@users.noreply.github.com>
2024-01-25 14:04:40 +02:00
dependabot[bot]
a6ece472c4
Bump actions/cache from 3 to 4 (#704)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-23 11:29:53 +02:00
Sergey
35cac483c9
Add new arguments to podman status commands (#703)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-01-23 11:28:55 +02:00
Sergey
1fe9642576
Add option to parse CreateCommand easily for diff calc (#698)
We have a few calculations of given options and arguments from
CreateCommand, so let's do it in a more convinient way.
Define a function _createcommand which receives an argument
and returns all values for it in a command line of Podman.
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-01-11 15:30:24 +02:00
Andreas Seidl
eab26e5eba
Fix idempotency for podman_network (#699) (#700)
* Fix idempotency for podman_network when explicitly definining disable_dns parameter for Podman driver other than type bridge

Signed-off-by: andreas.seidl <andreas.seidl@r-kom.de>
2024-01-11 14:13:32 +02:00
Sergey
f9cbca5582
Add idempotency for podman_secret (#693)
* Add idempotency for podman_secret

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

* Add lables support for podman_secret

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

---------

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-12-23 18:52:25 +02:00
Sergey
5ee4dd1eda
Fix broken conmon version in CI install (#695)
Podman issue:
https://github.com/containers/podman/issues/21024

Conmon issue:
https://github.com/containers/conmon/issues/475

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-12-23 13:20:01 +02:00
dependabot[bot]
45893f4a7b
Bump actions/setup-python from 4 to 5 (#688)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-11 18:40:25 +02:00
Apollo3zehn
e4cf9f6133
Fix example name (#687)
Signed-off-by: Apollo3zehn <git@m1.apollo3zehn.net>
Co-authored-by: Apollo3zehn <git@m1.apollo3zehn.net>
2023-12-11 14:20:59 +02:00
Alessandro Fulgini
4d233a4146
Alias generate systemd options stop_timeout and time (#685)
* Alias generate systemd options `stop_timeout` and `time`

Closes #683

Option `time` was used before Podman v4, then it was renamed
`stop_timeout`.
Accept both names (the newer takes prirority) and set the correct
CLI argument name based on the detected Podman version.

Signed-off-by: Alessandro Fulgini <fuljo97@gmail.com>

* Fix typo in parameter name `--stop-timeout`

Signed-off-by: Alessandro Fulgini <fuljo97@gmail.com>

* Don't delete temporary variables at the end of block

Co-authored-by: Sergey <6213510+sshnaidm@users.noreply.github.com>

---------

Signed-off-by: Alessandro Fulgini <fuljo97@gmail.com>
Co-authored-by: Sergey <6213510+sshnaidm@users.noreply.github.com>
2023-12-07 11:24:28 +02:00
Sergey
e245e332f0
Fix volume inspection by name in podman_volume (#684)
Fix #661
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-12-03 20:54:52 +02:00
Sergey
edcb13dd8a
Fail if systemd generation failed and it's explicitly set (#682)
Fix #675

If we explicitly set to generate systemd with parameters, fail
the module if the generation failed.

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-11-30 16:04:51 +02: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
Sergey
2d006399b0
Fix idempotency when using 0.0.0.0 in ports (#679)
Fix #678
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-11-30 15:12:17 +02:00
Sergey
821fe265eb
Fix CI rootfs for podman_container (#681)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-11-30 15:02:49 +02:00
Pablo Méndez Hernández
ea51855a4c
Add support for setting underlying interface in podman_network (#677)
It may be desirable to set a different interface than the default one
(for example, a different bridge).

In the case of a macvlan interface, it can be used instead of setting
`opt.parent`.

Signed-off-by: Pablo Méndez Hernández <pablomh@redhat.com>
2023-11-29 17:31:49 +02:00
Roberto Alfieri
b693cb6b89
Recreate stopped containers if recreate flag is enabled (#669)
If `recreate` flag is enabled we should be able to (force) recreate stopped
containers even if they're configuration isn't changed.

Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
2023-11-28 10:14:24 +02:00
Roberto Alfieri
6c87654f7f
Improve security_opt comparison between existing container (#673)
Since SElinux labels are basically annotations, they are merged in a single comma separated string in the list by podman, so we need to split them in a sorted list if we want to compare it to the list that we provide to the module.

Also, a proper test of this example has been added.

Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
2023-11-28 10:13:17 +02:00
Sergey
59a0dee373
Fix multi-image support for podman_save (#672)
Fix #670
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-11-26 21:31:47 +02:00
nishipy
b7e8711230
Add log_opt and annotaion options to podman_play module (#668)
* Add tests for options of podman_play

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

* Add log_opt and annotaion options for podman_play

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

* Fix pep8 errors

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

* Update tests in play-with-options.yml

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

* Update podman_play.py

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

* Update test

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

---------

Signed-off-by: nishipy <goodisonev4@gmail.com>
2023-11-26 14:03:55 +02:00
Sergey
22e0c937d8
Fix the docs for new modules (#667)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-11-04 13:31:27 +02:00
Sergey
9b31d8f01d
Release 1.11.0 version (#666)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-11-04 12:28:13 +02:00
Sergey
1a83e0948b
Release new 1.10.4 version (#663)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-11-01 16:47:25 +02:00
Denis Medeiros
3c0d2cc58c
Add support for health-on-failure action (#658)
Signed-off-by: Denis Medeiros <denis.medeiros@bbd.ca>
2023-11-01 11:31:55 +02:00
Sergey
a9fc6b9764
Fix CI jobs for podman_pod with network force (#662)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-11-01 11:31:00 +02:00
Chris Xiao
e463004db7
Fix #656: Do not force network removal by default (#660)
* fix #656: do not force network removal by default

* Remove `-f` flag when removing network with `podman network rm`, so
  that containers using the network won't be removed by default.
* Add `force` option (default False) to `podman_network`, which uses `-f`
  and removes containers using the network

Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>

* set default=False for `force`

Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>

---------

Signed-off-by: Chris Xiao <30990835+chrisx8@users.noreply.github.com>
2023-10-31 12:28:41 +02:00
nishipy
b65a3dea60
Add build and context_dir option to podman_play (#649)
* Add test for kube_play with image build

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

* Add build and context_dir options to podman_play

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

* Fix yamllint errors

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

* Fix ci errors

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

---------

Signed-off-by: nishipy <goodisonev4@gmail.com>
2023-10-19 17:25:23 +03:00
Sergey
ed8c04fa1e
Fix CI job for podman connection (#655)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-10-19 17:20:56 +03:00
Sergey
a1a667b726
Fix network DNS enable idempotency issue (#650)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-09-28 11:42:54 +03:00
nishipy
2a8aaf4522
Add options for resource limits to podman_pod (#635)
* Add resource limiting paramters for podman_pod

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

* Fix doc-elements-mismatch

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

* Update tests for podman_pod

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

---------

Signed-off-by: nishipy <goodisonev4@gmail.com>
2023-09-08 13:36:31 +03:00
Sergey
e025e928b2
Fix common file for Python 2.7 (#643)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-09-06 13:28:52 +03: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
dependabot[bot]
65d9d49aa4
Bump actions/checkout from 3 to 4 (#641)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 11:29:22 +03:00
Pavel Dostál
d2daf7262e
Optimize the podman_runlabel integration test (#640)
I used [1] as example.

[1]: https://fossies.org/linux/podman/test/system/037-runlabel.bats

Signed-off-by: Pavel Dostál <pdostal@pdostal.cz>
2023-09-05 11:28:58 +03:00
Sergey
e160458eb6
Fix idempotency when running inside Podman container (#637)
Fix #636
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-08-29 12:55:03 +03:00
Sergey
e42e11c714
Add CI for runlabel testing (#630)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-08-23 00:03:50 +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