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
nishipy
bc3670f8dc
Add podman_container_exec module ( #627 )
...
* Add podman_container_exec
Signed-off-by: nishipy <goodisonev4@gmail.com>
* Update podman_container_exec
Signed-off-by: nishipy <goodisonev4@gmail.com>
* Add tests for podman_container_exec
Signed-off-by: nishipy <goodisonev4@gmail.com>
* Update examples for podman_container_exec
Signed-off-by: nishipy <goodisonev4@gmail.com>
* Fix CI errors
Signed-off-by: nishipy <goodisonev4@gmail.com>
* Fix CI errors
Signed-off-by: nishipy <goodisonev4@gmail.com>
* Fix typo
Signed-off-by: nishipy <goodisonev4@gmail.com>
* Add workflow for podman_container_exec
Signed-off-by: nishipy <goodisonev4@gmail.com>
* Fix python version in the workflow for podman_container_exec
Signed-off-by: nishipy <goodisonev4@gmail.com>
* Fix python version in the workflow for podman_container_exec
Signed-off-by: nishipy <goodisonev4@gmail.com>
---------
Signed-off-by: nishipy <goodisonev4@gmail.com>
2023-08-22 18:52:07 +03:00
Pavel Dostál
c6ae4b97e7
Add podman_runlabel module ( #626 )
...
This is implementing the [podman container runlabel](https://docs.podman.io/en/latest/markdown/podman-container-runlabel.1.html ) command.
Signed-off-by: Pavel Dostál <pdostal@suse.cz>
2023-08-22 16:47:52 +03:00
Sergey
fea8b255e5
Release 1.10.3 version ( #625 )
...
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-08-15 21:18:10 +03:00
nishipy
04f455bec1
Add a force field to podman_generate_systemd ( #624 )
...
* Add tests for podman_generate_systemd
Signed-off-by: nishipy <goodisonev4@gmail.com>
* Add force option for podman_generate_systemd
Signed-off-by: nishipy <goodisonev4@gmail.com>
* Fix test code for podman_generate_systemd
Signed-off-by: nishipy <goodisonev4@gmail.com>
* Fix CI error
Signed-off-by: nishipy <goodisonev4@gmail.com>
---------
Signed-off-by: nishipy <goodisonev4@gmail.com>
2023-08-13 21:51:13 +03:00
Sergey
c6a80a5573
Add example with quotes in command to docs ( #623 )
...
Fix #449
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-08-12 15:04:00 +03:00
Sergey
11f9eded6a
Fix idempoency issue with PID of container ( #622 )
...
Fix #573
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-08-12 14:25:09 +03:00
Sergey
4812aea6b8
Improve docs about container env_file on remote machine ( #621 )
...
Fix #583
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-08-12 13:53:59 +03:00
Sergey
faee18ecdc
Fix healthcheck issue where defined in image ( #618 )
...
Fix #598
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-08-12 11:32:39 +03:00
DilasserT
e4cd2c4493
Adding volume import and export option ( #617 )
...
* Adding volume import and export option
adding volume import and volume export to podman_import and podman_export
Updating integration tests
Signed-off-by: DilasserT <dilassert@gmail.com>
* Fixes and linting
Signed-off-by: DilasserT <dilassert@gmail.com>
---------
Signed-off-by: DilasserT <dilassert@gmail.com>
2023-08-11 16:29:22 +03:00
Sergey
aeec6b92d6
Revert "Use replace option to recreate a container ( #613 )" ( #616 )
...
This reverts commit cb832c9a84 .
We lose flexibility in recreating workflow, replace actually
does the same in Podman - stops and removes/creates.
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-08-07 11:08:18 +03:00
Sergey
cb832c9a84
Use replace option to recreate a container ( #613 )
...
In recreating container use `--replace` option.
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-08-06 21:26:15 +03:00
Sergey
ff12ccddaf
Add restart-sec and other options to systemd generation. ( #615 )
...
Add restart_sec, start_timeout_sec and stop_timeout_sec
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-08-06 21:15:36 +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
7a307453a5
Add diff and change detection to systemd generation ( #608 )
...
Fix #339
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-08-03 16:26:18 +03:00
Holger Müller
cc34c2b780
added cpu_quota parameter to podman_container ( #612 )
...
* added cpu_qouta parameter to podman_container
Signed-off-by: Holger Mueller <holger.mueller@inovex.de>
* add missing key to parameter dict
Signed-off-by: Holger Mueller <holger.mueller@inovex.de>
---------
Signed-off-by: Holger Mueller <holger.mueller@inovex.de>
Co-authored-by: Holger Mueller <holger.mueller@inovex.de>
2023-08-03 15:57:10 +03:00
Holger Müller
2914785411
Fixed idempotency with cpus parameter ( #581 )
...
* Added cpu_quota parameter and fixed #559
Signed-off-by: Holger Mueller <holger.mueller@inovex.de>
* force float for cpu parameter in diff
Signed-off-by: Holger Mueller <holger.mueller@inovex.de>
* fixed typo
Signed-off-by: Holger Mueller <holger.mueller@inovex.de>
* revert linebreak caused by linting with too short lines
Signed-off-by: Holger Mueller <holger.mueller@inovex.de>
* removed quota parameter from patch
Signed-off-by: Holger Mueller <holger.mueller@inovex.de>
* readded already existing quota key to defaults
Signed-off-by: Holger Mueller <holger.mueller@inovex.de>
---------
Signed-off-by: Holger Mueller <holger.mueller@inovex.de>
Co-authored-by: Holger Mueller <holger.mueller@inovex.de>
2023-08-03 15:29:06 +03:00
Sergey
4e2f42eea6
Fix idempotency for devices ( #611 )
...
Fix #610
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-08-02 18:21:43 +03:00
Benjamin Schubert
9aedda4443
Fix idempotency checks when using userns ( #599 )
...
Previously, this would only mark the userns as expected when `uidmap`
or `gidmap` is passed. However, in the case `userns` is passed, this
is also expected to be set.
Signed-off-by: Benjamin Schubert <contact@benschubert.me>
2023-07-31 20:55:03 +03:00
sedrubal
0ae6baac3d
Fix idempotency for RestartPolicy when MaximumRetryCount > 0 ( #607 )
...
Before this change, this task:
```ansible
- containers.podman.podman_container:
# ...
restart_policy: on-failure:3
# ...
```
always caused this diff:
```diff
--- before
+++ after
@@ -1 +1 @@
-restart_policy - on-failure
+restart_policy - on-failure:3
```
Signed-off-by: Sebastian Endres <sebastian.endres@dlr.de>
Co-authored-by: Sebastian Endres <sebastian.endres@dlr.de>
2023-07-30 21:59:13 +03:00
Sergey
0932809c6a
Set Python >=3.10 for Ansible 2.16 ( #602 )
...
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-07-11 20:32:53 +03:00
Sergey
e3000939ef
Fix python versions for CI, drop 2.7 job ( #601 )
...
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-07-10 15:06:45 +03:00
Sergey
9b60fc5a33
Release 1.10.2 version ( #595 )
...
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-05-31 13:29:13 +03:00