Compare commits

...

321 Commits
1.9.2 ... main

Author SHA1 Message Date
Sergey 15423c0a5a
Fix Ansible sanity issues for new version (#974)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-08-29 11:58:20 +03:00
Sergey 73b7bb1d3e
Update docs and script (#973)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-08-25 11:45:29 +03:00
Sergey 5265f8c91c
Test new documentation (#972)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-08-25 10:25:00 +03:00
Sergey f333fe7fca
Add podman system connection modules (#971)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-08-25 09:35:27 +03:00
Sergey ee52d9de78
Add podman image scp option (#970)
* Add podman image scp option

Fix #536


---------

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-08-19 23:30:35 +03:00
dependabot[bot] c2530a63f3
Bump actions/checkout from 4 to 5 (#967)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [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/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  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>
2025-08-19 21:06:56 +03:00
Sergey 9cffa671c8
Fix podman logout for newer Podman (#969)
Fix #935

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-08-18 23:15:41 +03:00
Sergey f4b57ac265
Remove quiet mode from pulling image (#968)
Fix #966

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-08-18 22:51:19 +03:00
Sergey 6ee2f3891b
Add inventory plugins for buildah and podman (#963)
Add inventory plugins for buildah and podman, unit tests and functional CI tests.
---------

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-08-13 16:48:50 +03:00
dependabot[bot] fb76891c50
Bump actions/checkout from 4 to 5 (#964)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [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/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  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>
2025-08-12 12:23:23 +03:00
dependabot[bot] 6e8c88068f
Bump actions/download-artifact from 4 to 5 (#965)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '5'
  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>
2025-08-12 11:46:49 +03:00
Sergey 4d1917ac57
Add unittests for podman_image (#961)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-08-06 00:05:07 +03:00
Sergey 8f0bc79e6f
Fix podman_image correct delimiter logic for version@digest tags (#960)
Fix incorrect image URL formation when using separate name and tag parameters
where the tag contains a digest. Previously, tags like "8-bookworm@sha256:..."
would incorrectly use "@" as the delimiter between name and tag, resulting in
malformed URLs like "docker.io/valkey/valkey@8-bookworm@sha256:...".
The issue was in ImageRepository.delimiter logic which used substring matching
("sha256" in tag) instead of checking for pure digest format.
Changes:
  - Fix delimiter selection in ImageRepository.__init__() to only use "@" for
    pure digests starting with "sha256:", not any tag containing "sha256"
  - Add comprehensive unit tests covering all delimiter scenarios
  - Add integration tests with real digest validation and edge cases
  - Ensure proper URL formation: name:tag@digest vs name@digest

Before: docker.io/valkey/valkey@8-bookworm@sha256:abc123 (broken)
After:  docker.io/valkey/valkey:8-bookworm@sha256:abc123 (correct)

Fixes #947
Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-08-05 23:05:17 +03:00
Sergey e37123e06f
Rewrite podman_image and add tests (#957)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-08-04 16:28:35 +03:00
Sergey 859215bdfb
Fix README (#959)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-08-04 12:10:02 +03:00
Sergey 5bb0395e9e
Improve docs and guides (#958)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-08-03 14:22:57 +03:00
Sergey 91d991f95b
Add building Podman from source (#955)
* Add building Podman from source

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-08-03 13:30:27 +03:00
Sergey 28126094cc
Fix PR template (#956)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-07-31 17:14:34 +03:00
Sergey 2de46dd4de
Add template based issue and PR (#954)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-07-31 16:56:09 +03:00
Sergey 54c23c9876
Add templates based CI (#953)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-07-31 16:47:10 +03:00
Sergey 68af6b98fd
Fix remaining issues in CI for Ansible 2.20 (#952)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-07-31 14:20:46 +03:00
Sergey e12f269323
Fix Python version in CI for latest Ansible 2.19 (#951)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-07-31 13:54:17 +03:00
Sergey 43e9e4c5aa
Fix obsolete image in CI (#949)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-07-14 20:31:36 +03:00
Sergey f41939d8d8
Replace image in tests from quay.io (#948)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-07-12 16:38:54 +03:00
Sergey 87be6de5c7
Add ignore file for Ansible 2.20 (#946)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-07-01 16:25:35 +03:00
Sergey 13a568f8c6
Release 1.17.0 (#945)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-06-26 13:47:49 +03:00
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
johnsonlien aa20ede71e
Add podman system info module (#922)
Add podman system info module

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

Co-authored-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-06-22 13:13:11 +03:00
Sergey f6bd81e820
Add another test for volumes (#942)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-06-22 12:25:25 +03:00
lucas-benedito 6ff93e7559
podman_container_lib: Added checks for volume opts (#941)
* podman_container_lib: Added checks for volume opts

Changed the diffparam_volume function to include the volume mount opts.

Signed-off-by: Lucas Benedito <lbenedit@redhat.com>

* Add test for volume mount options

Signed-off-by: Lucas Benedito <lbenedit@redhat.com>

---------

Signed-off-by: Lucas Benedito <lbenedit@redhat.com>
2025-06-22 12:17:32 +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
Sergey 50c5a2549d
Release 1.16.4 version (#938)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-06-04 14:16:51 +03:00
Sergey 11cc00e6ca
Fix idempotency for systemd keyword (#937)
Fix #936

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-05-29 14:16:09 +03:00
André Lersveen ac5da409fe
Fix idempotency for any podman secret driver (#929)
* Fix idempotency for any podman secret driver

All secret drivers are provided with the same interface in podman, so there is no need to hardcode the state as changed for all drivers other than 'file'.

Signed-off-by: lersveen <7195448+lersveen@users.noreply.github.com>

* ci: add tests for shell secret driver

Signed-off-by: lersveen <7195448+lersveen@users.noreply.github.com>

---------

Signed-off-by: lersveen <7195448+lersveen@users.noreply.github.com>
2025-05-13 15:06:45 +03:00
Sergey 8a57012970
Fix None values in LogOpt in Quadlet (#933)
Fix #914

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-05-12 12:50:49 +03:00
Sergey 2c040aa346
Set custom tmpfs idempotency (#932)
Fix #918

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-05-12 12:20:02 +03:00
Sergey 5ea945dffe
Handle image arguments in podman_container (#931)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-05-11 18:38:49 +03:00
Sergey f1a9456147
Fix conditions in CI jobs (#928)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-04-28 00:14:28 +03:00
Sergey 35a9cc1f93
Fix setuptools (#925)
Fix #917
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-04-21 11:46:44 +03:00
Evgeni Golov 6946a0bcbd
correctly quote labels and environment variables for quadlets (#920)
Fixes: #807

Signed-off-by: Evgeni Golov <evgeni@golov.de>
2025-04-14 14:47:20 +03:00
Ewoud Kohl van Wijngaarden 40d320d8f6
Document that sdnotify can be set to healthy (#911)
For quadlets you can set sdnotify (which maps to Notify=) to healthy to
use a healthcheck to determine when the container is up.

Signed-off-by: Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
2025-03-10 10:24:42 +02:00
Sergey d901da6301
Fix CI for podman_image_info (#912)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-03-09 16:14:55 +02:00
jeu-umanit 1449f4c1b7
doc: podman_secret: fix indentation error in example (#905)
Signed-off-by: Julien Eula <jeula@umanit.fr>
2025-03-03 13:06:30 +02: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
Sergey 47767dab21
Remove docker protocol when inspecting image (#901)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-02-17 15:17:47 +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
Sergey 010410ae31
Release 1.16.3 (#897)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-01-29 22:15:54 +02:00
Popkornium18 a45d94d503
Fix idempotency for containers with env vars containing MAX_SIZE (#893)
Signed-off-by: Popkornium18 <mail@popkornium18.de>
2025-01-19 20:34:26 +02:00
Hagen 16b034b71f
Fix podman_container_copy examples (#882)
Signed-off-by: hagene <hagene@uio.no>
2025-01-08 16:24:49 +02:00
Sergey 64e4247347
Don't pull image when state is absent or pull=never (#889)
fix #888
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2025-01-08 15:38:03 +02:00
Sergey 7fa610a416
Convert DNS domain search to a list (#881)
Fix #880

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-12-13 20:34:17 +02:00
Vinícius Hashimoto d68ca756de
docs(podman_container): improve comments on network property (#878)
Signed-off-by: vkhashimoto <me@vkhashimoto.dev>
2024-11-24 20:34:29 +02:00
nishipy 1282fc576a
Rename master branch to main (#634)
* Rename master branch to main

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

* Update with new files

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

---------

Signed-off-by: nishipy <goodisonev4@gmail.com>
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
Co-authored-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-11-12 14:11:54 +02:00
Sergey a77ca6ab85
Fix list tags failure in podman_search (#875)
Fix #874
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-11-05 14:35:07 +02:00
Sergey 4c84135f5d
Release 1.16.2 version (#873)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-11-03 22:15:02 +02:00
Sergey 4d3009fda9
Don't check image availability in Quadlet (#872)
Fix #871
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-10-27 20:35:45 +02:00
Sergey 62348545b8
Add option to specify kube file content in module (#863)
Fix #463
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-10-23 18:35:25 +03:00
QCU 309893047d
fix: quadlet cmd_args append mistake (#869)
Signed-off-by: QCU <qcu266@gmail.com>
2024-10-22 15:51:13 +03: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
InsideTheVoid 84cff745f9
Fix unsupported pull policy in example on podman_container.py (#865)
Signed-off-by: InsideTheVoid <824767+InsideTheVoid@users.noreply.github.com>
2024-10-15 13:33:19 +03:00
InsideTheVoid 1bdf437d09
Fix typo in quadlet generator (#868)
This typo prevents the quadlet generator from picking up
--cpus and --platform options.

Signed-off-by: InsideTheVoid <824767+InsideTheVoid@users.noreply.github.com>
2024-10-15 13:33:03 +03:00
Sergey d4977eae0a
Fix max_size idempotency issue (#862)
Fix #843
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-10-11 22:28:19 +03:00
Maximilian Stinsky 8aa5708355
podman_login does not support check_mode (#860)
The podman_login module does not have code to support check runs. Therefore a check run in ansible does the actual login. Set supports_check_mode to False so the login is skipped in a dry-run.

Signed-off-by: Maximilian Stinsky <maximilian@stinsky.com>
2024-10-08 17:40:24 +03:00
Martin Jackson e46c7eb1a1
Add secret to login module (#858)
Signed-off-by: Martin Jackson <mhjacks@swbell.net>
Co-authored-by: Sergey <6213510+sshnaidm@users.noreply.github.com>
2024-10-07 23:08:29 +03:00
Thomas Preindl 8daec72a04
Add missing parameters for podman container quadlet (#847)
* Revert "Add group_add parameter for podman quadlet (#827)"

This reverts commit 4f24eced99.

Signed-off-by: Thomas Preindl <tompre@users.noreply.github.com>

* Add 'group_add' to 'GroupAdd' parameter mapping for podman container quadlet

Signed-off-by: Thomas Preindl <tompre@users.noreply.github.com>

* Add 'cgroups' to 'CgroupsMode' parameter mapping for podman container quadlet

Signed-off-by: Thomas Preindl <tompre@users.noreply.github.com>

* Fix 'etc_hosts' to 'AddHost' parameter mapping for podman container quadlet

Signed-off-by: Thomas Preindl <tompre@users.noreply.github.com>

* Fix 'network_aliases' to 'NetworkAlias' parameter mapping for podman container quadlet

Signed-off-by: Thomas Preindl <tompre@users.noreply.github.com>

* Fix 'stop_signal' to 'StopSignal' parameter mapping for podman container quadlet

Signed-off-by: Thomas Preindl <tompre@users.noreply.github.com>

* Add 'cpus' parameter mapping for podman container quadlet

Signed-off-by: Thomas Preindl <tompre@users.noreply.github.com>

* Add 'platform' parameter mapping for podman container quadlet

Signed-off-by: Thomas Preindl <tompre@users.noreply.github.com>

* Add 'log_opt' to 'LogOpt' parameter mapping for podman container quadlet

Signed-off-by: Thomas Preindl <tompre@users.noreply.github.com>

---------

Signed-off-by: Thomas Preindl <tompre@users.noreply.github.com>
2024-10-06 23:29:58 +03:00
Sergey ca8267c83b
Add new options for podman_network (#856)
Fix #846
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-09-29 20:44:58 +03:00
Sergey a2806b87fd
Release 1.16.1 version (#854)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-09-26 11:29:57 +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
Evgeni Golov 36c146a633
don't document quadlet_dir as required when setting state=quadlet (#852)
The underlying code has sane defaults and will figure out the
directory on its own in most cases
0b773e5d61/plugins/module_utils/podman/quadlet.py (L688-L693)

Signed-off-by: Evgeni Golov <evgeni@golov.de>
2024-09-25 17:51:54 +03:00
Sergey 0b773e5d61
Release 1.16.0 version (#851)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-09-24 14:26:00 +03:00
Sergey c11b2af89d
CI: add ignore list for Ansible sanity for 2.19 (#850)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-09-24 12:16:23 +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
Sergey 2adc93ffb1
CI: change k8s.gcr.io to registry.k8s.io in tests (#842)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-09-09 11:25:50 +03:00
Sergey 46d4378426
Fix command idempotency with quotes (#839)
Fix #838
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-09-05 19:31:28 +03:00
Sergey f9d33e880b
CI: bump artifacts versions for GHactions (#837)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-09-04 13:53:47 +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 83d0eefcb5
Disable idempotency for pod_id_file (#829)
Fix #828
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-09-02 19:54:39 +03:00
Thomas Preindl 4f24eced99
Add group_add parameter for podman quadlet (#827)
* Add group_add parameter for podman quadlet

* Update plugins/module_utils/podman/quadlet.py

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

---------

Co-authored-by: Sergey <6213510+sshnaidm@users.noreply.github.com>
2024-09-02 19:54:22 +03:00
Nikita Tokarchuk 25a64101f2
Fix quadlet parameters when container uses rootfs (#835)
Adjust quadlet parameters to set rootfs as image and clear image field when rootfs container is being used.

Signed-off-by: Nikita Tokarchuk <nikita@tokarch.uk>
2024-09-02 19:25:20 +03:00
Benjamin MENANT ac3a7a5fde
fix(podman_save): always changed when force (#834)
fixes #826

Signed-off-by: Benjamin Menant <dev@menant-benjamin.fr>
2024-09-02 18:52:14 +03:00
dependabot[bot] 552af3ef7f
Bump actions/checkout from 3 to 4 (#822)
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>
2024-08-20 16:57:49 +03:00
dependabot[bot] ebc6f13c07
Bump actions/setup-python from 4 to 5 (#821)
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>
2024-08-20 16:57:31 +03:00
dependabot[bot] 5bbc06a26c
Bump actions/cache from 3 to 4 (#823)
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-08-20 16:57:13 +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 ba88eda0fc
CI: Add images removal for tests (#817)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-08-16 15:11:12 +03:00
Sergey 6c2dda7820
Add support for check_mode in Quadlet (#818)
Fix #808
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-08-16 15:10:55 +03:00
Alessandro Rossi 92fe1464a0
fix for tls_verify being ignored (#815)
Signed-off-by: kubealex <al.rossi87@gmail.com>
2024-08-15 16:26:09 +03:00
Holger Hees 93c1532b04
Fix health-startup-cmd (#809)
"--health-startup-command" is a wrong parameter.

the correct syntax is

"--health-startup-cmd"
2024-08-15 13:56:21 +03:00
Alessandro Rossi eb46429493
Add podman_container_copy module (#813)
Signed-off-by: kubealex <al.rossi87@gmail.com>
2024-08-13 12:56:47 +03:00
Sergey 202a0fb6da
CI: fix Podman search of invalid image (#812)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-08-07 14:52:57 +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 3e303c7797
Fix podman CI test container images (#804)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-07-14 23:24:19 +03:00
Sergey 3087fcc353
Release 1.15.4 (#801)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-07-12 11:17:46 +03:00
Sergey 4e65a7bc94
Fix quadlet parameters for restart policy (#798)
Fix #797
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-07-11 11:13:56 +03:00
Sergey d25cf57967
Idempotency improvements (#795)
* Fix integers in Quadlet generation
* Work around quotes in command for idempotency

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-07-07 22:55:26 +03:00
Giovanni Baratta 9775178872
Fix missing entries in network quadlet generated file (#792) (#793)
Signed-off-by: Giovanni Baratta <bargiovi@hotmail.it>
2024-06-25 17:51:52 +03:00
Sergey d113847336
Release 1.15.3 version (#791)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-06-20 22:36:27 +03:00
Sergey 24c842fdd6
Fix idempotency for empty values (#790)
Fix #788
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-06-20 09:53:16 +03:00
Sergey f9aa8878fd
CI: Update python for latest Ansible to 3.11 in CI (#789)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-06-19 10:46:22 +03:00
Sergey 680b9a9309
Upgrade Python version for latest Ansible (#786)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-06-19 10:18:45 +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
Richard Megginson c3c5877279
params gpus should be exit_policy (#784)
The code should be setting `--exit-policy` to the value of `params['exit_policy']`
instead of `params['gpus']`

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-06-13 14:35:10 +03:00
Sergey e88baa9c8d
Release 1.15.2 (#783)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-06-11 20:06:33 +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 fb6ebaae55
Release 1.15.1 version (#778)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-06-07 00:23:17 +03:00
Sergey 9c40a88a71
Fix idempotency for pods in case of systemd generation (#777)
Fix #774

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-06-07 00:15:57 +03:00
Sergey 8a8f9023e6
Fix idempotency for systemd generations (#776)
Fix #775

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-06-07 00:08:02 +03:00
Sergey 510d8ad35b
Release 1.15.0 version (#773)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-06-03 10:04:34 +03:00
Sergey 98dd70ae74
Add CI job for Podman search module (#772)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-06-03 09:54:20 +03:00
Derek Waters 38d95029e8
Add podman search (#770)
* Add podman_search module

Signed-off-by: Derek <derek@frisbeeworld.com>
2024-06-03 09:49:29 +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 abb667546c
Release 1.14.0 version (#768)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-05-30 08:09:50 +03:00
Sergey d75126d68a
Add path and env options for podman_secret (#766)
Fix #741
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-05-29 23:23:34 +03:00
Sergey f9ab05b0ae
Add mount and unmount for volumes (#764)
Fix #603
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-05-29 18:28:44 +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 0e24de1dd3
Add new functionality tests for podman_secret (#765)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-05-29 10:41:30 +03:00
Oleg Bulatov d5224b5323
Create podman secret when skip_existing=True and it does not exist (#733)
Signed-off-by: Oleg Bulatov <oleg@bulatov.me>
2024-05-29 10:34:12 +03:00
Sergey 863ac0e38a
Add docs, tests and more examples for podman_pod (#763)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-05-29 10:24:01 +03:00
Sergey 9142efd82a
Add multiple subnets for networks (#762)
Improve idempotency.
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-05-28 18:36:52 +03:00
Sergey 2887be7289
Add route, dns and ipam_driver to podman_network (#761)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-05-27 21:59:14 +03:00
Sergey 47fc4cc119
Redesign idempotency for Podman Pod module (#759)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-05-27 17:49:32 +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 e29e2cfb19
Improve idempotency for networking in podman_container (#756)
Related: #555

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-05-23 13:33:01 +03:00
Sergey e1e4e7516a
Add idempotency for mounts and volumes (#753)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-05-22 22:08:57 +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
Sergey 2f5da14c30
Add new options for podman_container (#750)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-05-22 14:30:28 +03:00
Sergey a9e92c902b
Add CI jobs for changes in Quadlet file (#749)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-05-19 22:41:22 +03:00
Marko Weltzer 9f34e8f78a
fix(#747): set correct HealthCmd (#748)
Signed-off-by: Marko Weltzer <marwel_github@bugga.de>
2024-05-19 22:27:52 +03:00
Sergey 1ffa40c705
Use python3image for buildah CI (#746)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-05-17 21:42:55 +03:00
Sergey b987120fa0
Add new options to pod module (#745)
Fix #742

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-05-16 14:50:47 +03:00
Sergey 4c987a1c22
Fix idempotency for pod with 0.0.0.0 (#744)
Fix #743
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-05-13 17:21:03 +03:00
Sagi Shnaidman 35cdaa1365 Release 1.13.0 version
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-04-22 21:20:28 +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
Oliver Walsh 4591a44ef8
Fix pod info for non-existant pods (#732)
Do not try to deserialize json when out is empty

Fixes #731

Signed-off-by: Oliver Walsh <owalsh@redhat.com>
2024-04-12 16:24:13 +03:00
Sergey 7df5126cb3
Release 1.12.1 version (#730)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-04-08 01:29:27 +03:00
Sagi Shnaidman cb74414e50 Fix pod for Podman v5
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-04-08 01:11:46 +03:00
Sagi Shnaidman 75c4834273 Fix kube play annotations
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-04-08 01:11:46 +03:00
Sagi Shnaidman 453be5c5fd Add check and fixed for v5 network diff
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-04-08 01:11:46 +03:00
Sagi Shnaidman ace1f5896a Add pasta as default network mode after v5
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-04-08 01:11:46 +03:00
Sergey 7dce3c9c8e
Fix pasta networking idempotency for v5 (#728)
Fix #721

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2024-04-05 13:49:50 +03:00
nishipy 6e04b20bf4
Update the logic for deleting pods/containers in podman_play (#727)
* Add test case for deleting pod with podman_play

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

* Update test case for deleting pod with podman_play

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

* Add tear_down_pods() for Podman 3.4.0 or later

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

---------

Signed-off-by: nishipy <goodisonev4@gmail.com>
2024-03-28 13:31:56 +02:00
nishipy 44b2ce69e3
Add support for kube yaml files with multi-documents (#724)
* Add support for multi doc kube yaml

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

* Update to skip yamllint

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

* Update ignores for sanity tests

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

* Update discover_pods()

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

* Update test for podman_play

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

---------

Signed-off-by: nishipy <goodisonev4@gmail.com>
2024-03-23 13:55:44 +02:00
Dawa Ometto 890ae35360
Update podman_login.py (#725)
Make tlsverify and certdir parameters no longer mutually exclusive.

Signed-off-by: Dawa Ometto <d.ometto@gmail.com>
2024-03-19 13:38:19 +02:00
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
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
benblasco fc47f86a18
Added support for "userns" parameter to "play" module (#577)
Co-authored-by: Benjamin Blasco <bblasco@redhat.com>
2023-05-31 13:23:55 +03:00
Simon 52911bfc22
fix(podman-play): fix regex for pod kube recreate (#582)
Signed-off-by: Simon Kuhball <simon@kuhball.de>
Co-authored-by: rwxd <rwxd@pm.me>
2023-05-31 10:27:49 +03:00
Sergey 296faf6154
CI: fix podman play job (#594)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-05-30 22:31:58 +03:00
Sergey 45e1de2bfe
podman-pod: Fix idempotency for pods in 4.4.x versions (#593)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-05-30 19:52:51 +03:00
Sergey e5b37d9756
CI: fix pip installation of the collection (#592)
https://github.com/pypa/setuptools/issues/3197
latest release of setuptools 61.0 broke pip install

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-05-30 14:34:15 +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 4149dece62
Fix CI for newest Ansible branch 2.16 (#575)
Also include same file for next 3 releases...
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-04-05 20:46:47 +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 bb4b14bc5d
Add more explanation about cmd_args command usage (#568)
Fix #567

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-04-01 22:01:08 +03:00
spmfox 1a7dc953b4
podman-login - fix FIPS md5 issue and registry requirement (#566)
* Changing md5 to sha256 for FIPS compliance

Signed-off-by: spmfox <spmfox@foxwd.com>

* Removing check for registry

Signed-off-by: spmfox <spmfox@foxwd.com>

* Adding contributor name

Signed-off-by: spmfox <spmfox@foxwd.com>

---------

Signed-off-by: spmfox <spmfox@foxwd.com>
2023-04-01 13:56:09 +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 dba0d78844
podman_systemd: Ignore header when comparing systemd files content (#558)
Fix #557
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-03-04 18:06:23 +02:00
Benjamin Schubert 7c06ddec3b
pod: Support passing multiple networks with params (#553)
Similar to #472, but for pods. there is also support there

Signed-off-by: Benjamin Schubert <contact@benschubert.me>
2023-02-24 12:15:43 +02:00
Sergey 1bfa6396a5
Fix pylint issues for CI ansible-test (#550)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-02-14 16:22:36 +02:00
Sergey 9d168430a4
Fix idempotency lowercase for devices (#549)
Fix: #537

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-02-13 13:24:11 +02:00
Jannik Vieten f618b5ccc6
Improved documentation of `podman_generate_systemd` module (#542)
* podman_generate_systemd: fixed typos in docs and put 'dest' option hints where they belong

Signed-off-by: Jannik Vieten <me@exploide.net>

* podman_generate_systemd: added an idempotent example when using podman_generate_systemd with new:true

Signed-off-by: Jannik Vieten <me@exploide.net>

---------

Signed-off-by: Jannik Vieten <me@exploide.net>
2023-02-12 13:58:18 +02:00
Sergey 8f5842dea6
Add idempotency for restart-policy for containers (#548)
Fix: #440

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-02-12 13:00:00 +02:00
Sergey 132baa18e4
Add hooks-dir parameter for containers (#547)
Fix #539
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-02-12 01:47:46 +02:00
Sergey c4bc7ccada
Fix idempotency for pods with uidmap and gidmap (#546)
Fix #543

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-02-12 01:42:20 +02:00
Roberto Alfieri 7d1d016fe9
added podman_prune module (#538)
* added podman-prune module


---------

Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
Signed-off-by: Roberto Alfieri <me@rebtoor.com>
2023-01-31 02:22:57 +02:00
zalejus 66f2706464
fix for buildah improper remote target (#540)
This fix is similar to the previous one from [#506](https://github.com/containers/ansible-podman-collections/pull/506), but in buildah.py connection plugin

Signed-off-by: Arkadiusz Zalejski <arkadiusz.zalejski@gmail.com>

Signed-off-by: Arkadiusz Zalejski <arkadiusz.zalejski@gmail.com>
2023-01-18 23:55:36 +02:00
Sergey 877581e31f
Add missing options to podman network (#535)
Fix #534

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

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2023-01-01 18:20:51 +02:00
linxside a762dc63d0
Fix undesirable splitting of IPv6 host addresses (#533)
* fix: over splitting for ipv6 addresses

Signed-off-by: linxside <git@linux-inside.de>

* test: add test cases for ipv6 oversplitting

Signed-off-by: linxside <git@linux-inside.de>

Signed-off-by: linxside <git@linux-inside.de>
2022-12-13 03:50:40 +02:00
János Gerzson e39439831f
[FIX] Issue #529: become plugin podman_unshare become_user default (#530)
Signed-off-by: Janos Gerzson <gerzsonj@gmail.com>

Signed-off-by: Janos Gerzson <gerzsonj@gmail.com>
2022-11-30 23:08:18 +02:00
Sergey 73af4896b4
Prepare CI for Podman v3 backward compatibility (#528)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-11-29 02:49:27 +02:00
Sergey 2498c52f26
Fix network tests for Podman v4 (#527)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-11-29 01:37:55 +02:00
Sergey f8a70fe5b0
Fix podman logout tests for v4 (#526)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-11-29 00:41:17 +02:00
Sergey 4f6ed89607
Run CI jobs with newer podman 4 (#525)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-11-29 00:02:24 +02:00
Sergey 95649a6e66
Release 1.10.1 version (#522)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-11-22 21:00:16 +02:00
Sergey 76b070ff41
Fix docs for podman_unshare become plugin (#521)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-11-22 20:49:16 +02:00
Sergey d51e253703
Add missed docs for modules (#520)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-11-22 18:23:27 +02:00
phong-ngthanh ed69d3c143
feat: allow empty string for prefixes (#517)
Signed-off-by: zephyros-dev <phong.ngthanh@outlook.com>

Signed-off-by: zephyros-dev <phong.ngthanh@outlook.com>
2022-11-21 18:19:27 +02:00
Sergey 865e1cbee9
Release 1.10.0 version (#512)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-11-17 19:15:52 +02:00
dependabot[bot] 83632441b0
Bump actions/cache from 1 to 3 (#511)
Bumps [actions/cache](https://github.com/actions/cache) from 1 to 3.
- [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/v1...v3)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-14 18:37:12 +02:00
Sergey a90c040239
Fix expanduser in path for systemd generation (#510)
Use expanduser for path calculation.
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2133207
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-11-11 11:00:47 +02:00
Sergey 5c68ee09fe
Add protection for systemd files deletion (#509)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-11-10 21:06:55 +02:00
Sergey 5198b726fb
Delete systemd files when container/pod is deleted (#508)
Fix #489

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

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-11-10 17:13:45 +02:00
Pelisse Romain 4a1608e700
Warning about improperly configured remote target (#506)
Signed-off-by: Romain Pelisse <belaran@gmail.com>

Signed-off-by: Romain Pelisse <belaran@gmail.com>
2022-11-10 14:28:56 +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
Sergey 05dc08c201
Add example unittest for container lib (#505)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-11-01 00:39:46 +02:00
Sergey c952149603
Add unittests for Ansible Podman modules (#504)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-10-31 23:16:45 +02:00
Sergey 9e92a6e90c
Fix podman load module for Podman 4 (#503)
Fix #486
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-10-31 22:23:35 +02:00
Sergey 712c3230b2
Fix example in systemd generate module (#502)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-10-31 21:59:21 +02:00
CyberFox001 6cf118e7a9
Podman generate systemd (#498)
* Start a new Ansible module: podman_generate_systemd

This module, when finished, will let user generate a systemd .service
unit file from a pod or a container.

If a pod is specified, then the .service file is made for the pod and
its containers.

This commit is only the beginning, with two empty functions and the
base for a Python script.

* podman_generate_systemd : Remove not needed import from __future__

* podman_generate_systemd : Import AnsibleModule and json

* podman_generate_systemd : Build podman comand from user parameters

* podman_generate_systemd : Run the podman command and manage error

* podman_generate_systemd : Manage writing of systemd files, if needed

* podman_generate_systemd : In generate_systemd(), return needed infos

In case of success in generate_systemd() function, return:
- A boolean, indicate if the state of the target systemd is modified
- A copy of the systemd unit content

* podman_generate_systemd : Write run_module() function

This function:
- Build the list of parameters user can use
- Build a default result dictionary
- Build the Ansible Module
- Generate the systemd units (with generate_systemd())
- Return the result, with module.exit_json

* podman_generate_systemd : In main(), call run_module()

* podman_generate_systemd: Return podman command, and remove debug param

The run podman command is now returned by the module, and the "debug"
option is removed.

* podman_generate_systemd: Use more direct #! to python interpreter

The run podman command is now returned by the module, and the "debug"
option is removed.

* podman_generate_systemd: Write DOCUMENTATION variable

* podman_generate_systemd: Write EXAMPLES variable

* podman_generate_systemd: Write RETURN variable

* podman_generate_systemd: Fix typo

* podman_generate_systemd: 'restart_policy, remove default

* podman_generate_systemd: Fix missing "command" return when error

When error in command execution, generate_systemd() was not returning
the command. Now it's done.

* podman_generate_systemd: Remove unnecessary return in case of fail

In generate_systemd(), in case of fail in executing the podman
command, we call module.fail_json() then we return the usual data of
generate_systemd() function.

But module.fail_json() will stop the execution of the module, so it's
not necessary to return a value from generate_systemd() after calling
module.fail_json().

* podman_generate_systemd: Remove TODO

* podman_generate_systemd: Add missing double lines between functions

* podman_generate_systemd: More readability in EXAMPLES variable

* podman_generate_systemd: EXAMPLES, add minimum podman version

When a module option require a minimum Podman version, I indicate
this required version in option description.

For example: The module option `start_timeout` use the Podman option
`--start-timout`, which was introduced in Podman 4.0.0. So, I add in
the description of `start_timeout`: Only with Podman 4.0.0 and above

Options with this information:
- start_timeout
- restart_sec
- wants
- after
- requires

* podman_generate_systemd: EXAMPLES, fix type

* podman_generate_systemd: Simpler code for wants, after and requires

`after`, `wants` and `requires` are of type list. So, no need to
test their type and manage the case where they are of type string.

* podman_generate_systemd, generate_systemd(): Improve returned command

Improve how the used Podman command, returned by generate_systemd(),
is built. Instead of print a list in a formatted string, I join the
list elements with a space char as separator.

* podman_generate_systemd: Add support for the `env` option

Add, to the podman_generate_systemd module, the support for the `env`
option. This commit include the code, the option definition for the
module, the modification of the DOCUMENTATION variable and the add of
an usage example of this new option in the EXAMPLE variable.

* podman_generate_systemd: Write the integration test

* generate_systemd: Fix of the integration test and the --env command option

On the module, I now use the command option `-e=` for the definition
of environment variables. Because the option `--env` give an error
from Podman.

Also, fix errors in the integration test for this module.

* podman_generate_systemd: Add __future__ and __metaclass__ in the module

* podman_generate_systemd: Add author github ID

* podman_generate_systemd: Use argspec type path instead of str for dest option

In the module argspec, I now use the type `path` instead of `str` for
the option `dest`. `os.path.expanduser()` is no more necessary.

* podman_generate_systemd: remove all trailing whitespaces

* podman_generate_systemd: Remove type hint for compatibility with older Python

* podman_generate_systemd: Fix Documentation

Add a default for option `new` and fix typo in `use_names` option name.

* podman_generate_systemd: restart_policy option, new choices

The choice `no` is replaced by `no-restart`

* podman_generate_systemd: dest option in documentation, set type as path

Instead of str

* DNM add CI bits for new module tests

Made by sshnaidm.

* podman_generate_systemd: Better use of fail_json()

First: When calling the method fail_json(), name the `msg` argument to
avoid confusion.

Second: In case of calling fail_json(), I now return the same
arguments than the ones returned by a success: `changed`,
`systemd_units` and `podman_command`.

For future refactoring: Instead of calling fail_json() inside
generate_systemd(), raise custom exceptions and manage calling
fail_json() or exit_json() outside of generate_systemd().

* podman_generate_systemd: Add utf-8

* podman_generate_systemd: Remove `required: false` for DOCUMENTATION var

* podman_generate_systemd: DOCUMENTATION var, use bool instead of yes/no

* podman_generate_systemd: Remove non-necessary check of restart_policy option

The possible choices for this options are set in `ansible_spec` and
will be checked by AnsibleModule code. So, no need to check manually:
`ansible_spec` won't be anything other that the possible choices.

* podman_generate_systemd: On module params, use direct access to dict

Use `module.params['']` instead of `module.params.get('')`.

Because all module's options are defined with the `argument_spec`, the
options used here exist in the params. And if the user don't set
them, the value of the option is `None`.

* podman_generate_systemd: use shlex join for command_str

* podman_generate_systemd: use same quotes for messages

* podman_generate_systemd: Replace f-strings with .format(), for Python 2

* podman_generate_systemd: Revert usage of shlex

It add weird quotes around command options like `-e='ENV_VAR=value'`.

* podman_generate_systemd: Podman command build, more Python 2 compatible

Don't use any more the asterisk to add command options to the command.

* podman_generate_systemd: Better check-mode management

Now, when check mode is enabled, the module report "changed" is
something would be changed, but w/o actually doing anything.

* podman_generate_systemd: remove all trailing whitespaces

Co-authored-by: Sébastien Gendre <seb@k-7.ch>
2022-10-31 20:51:29 +02:00
antonc42 c9008c75b4
fix pod running status for older podman versions (#500)
* fix pod running status for older podman versions

Older podman versions, such as podman 1.6.4 on CentOS 7, do not have the
pod status in the 'podman pod inspect' output. Added an attribute and a
method to PodmanPod to fetch the 'podman pod ps' output. Added an
additional status check to the exising running property that uses the
'ps' info.

Fixes #499

Signed-off-by: antonc42 <antonc42@users.noreply.github.com>
2022-10-29 15:59:20 +03: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
dependabot[bot] 9531d15d24
Bump actions/upload-artifact from 1 to 3 (#496)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 1 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v1...v3)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-25 04:42:06 +03:00
dependabot[bot] 9fe0771f4e
Bump actions/setup-python from 2 to 4 (#497)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v4)

---
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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-25 04:41:31 +03:00
dependabot[bot] 6219c8cb34
Bump actions/checkout from 2 to 3 (#495)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [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/v2...v3)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-25 04:39:54 +03:00
dependabot[bot] 3e71b76b2e
Bump actions/download-artifact from 1 to 3 (#494)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 1 to 3.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v1...v3)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-25 04:39:26 +03:00
John Losito 3b3358c811
Check for gha updates weekly using dependabot (#490)
Signed-off-by: John Losito <lositojohnj@gmail.com>

Signed-off-by: John Losito <lositojohnj@gmail.com>
2022-10-25 04:17:10 +03:00
Sergey bf67c7e078
Improve idempotency for devices mount of rootless podman (#487)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-09-28 12:39:15 +03:00
János Gerzson 5f74d5b4fb
New become plugin: podman_unshare (#455)
* New become plugin: podman_unshare

Signed-off-by: Janos Gerzson <gerzsonj@gmail.com>
2022-09-22 17:24:45 +03:00
Sagi Shnaidman 409369c9fc Add shellcheck sanity ignore list for 2.15
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-09-21 02:40:05 +03:00
Sagi Shnaidman d0e3af2b99 Bump galaxy.yml for devel version
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-09-21 02:40:05 +03:00
Sergey 853d3a8cc7
Fix idempotency for labels in pods (#482)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-09-20 12:12:17 +03:00
Sergey 31dbd55579
Prepare tests to use custom executable, part 6 (#478)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-09-04 22:33:28 +03:00
Sergey 03f19dfe25
Prepare tests to use custom executable, part 5 (#477)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-09-04 22:03:29 +03:00
Sergey 9c1cd62b6f
Prepare tests to use custom executable, part 4 (#476)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-09-04 21:47:33 +03:00
Sergey d21b6c0326
Prepare tests to use custom executable, part 3 (#475)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-09-04 21:43:00 +03:00
Sergey 51ce943a63
Prepare tests to use custom executable, part 2 (#474)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-09-04 21:28:13 +03:00
Sergey e9d746728d
Prepare tests to use custom executable, part 1 (#473)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-09-04 21:09:04 +03:00
Sergey 93b5acbf6e
Support passing multiple networks with params (#472)
Fix #467
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-09-03 10:40:48 +03:00
Sergey bd0f6f9bc4
Improve networks idempotency for v4 (#471)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-09-02 19:33:16 +03:00
dada513 b72a026328
generate_systemd: implement --wants, --after and --requires (GH-431) (#432)
* generate_systemd: implement --wants, --after and --requires (GH-431)

Signed-off-by: dada513 <dada513@protonmail.com>
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
Co-authored-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-09-01 20:28:07 +03:00
Sergey befb381194
Create a sponsorship file (#466)
Create a sponsorship file
2022-08-29 01:44:46 +03:00
Sergey cecb29222e
Add --sdnotify option for container (#465)
Fix #464

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-08-28 16:42:31 +03:00
Nikita Tokarchuk 9068baeb99
podman_container should ensure image by using os path if rootfs is used (#458)
* Check image with os path if rootfs is used

Signed-off-by: Nikita Tokarchuk <nikita@tokarch.uk>

* Take into account rootfs usage while evaluating a diff

Signed-off-by: Nikita Tokarchuk <nikita@tokarch.uk>

* Always compare rootfs image diffparam as strict

Signed-off-by: Nikita Tokarchuk <nikita@tokarch.uk>

* Reverse image labels getter to ignore the value if None

Signed-off-by: Nikita Tokarchuk <nikita@tokarch.uk>

* Add tests to check podman rootfs containers

Signed-off-by: Nikita Tokarchuk <nikita@tokarch.uk>

Signed-off-by: Nikita Tokarchuk <nikita@tokarch.uk>
2022-08-12 06:26:16 +03:00
Albrecht 08dd7b0ceb
add required argument to example (#461)
Signed-off-by: weichweich <archbelt@posteo.de>
2022-08-08 22:28:15 +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
Adrian Freund 99c2851341
Fix rerunning playbooks with generate_systemd --new (#453)
* Fix restarting containers if --rm is enabled
* Automatically enable rm if generate_systemd.new is set
* Don't assume that the 'new' key in generate_systemd exists

Signed-off-by: Adrian Freund <adrian@freund.io>
2022-07-22 17:41:21 +03:00
Sergey ff60aed673
Set devel Ansible branch to run on Python 3.9 (#457)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-07-22 12:14:47 +03:00
Sergey 3596833a7d
Remove LC_ALL=C from podman tests (#452)
Ansible requires en_US.UTF-8 from 2.14 version.

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-07-14 12:26:28 +03:00
Sergey 33580c8991
Fix building image with buildah and become (#451)
Probably we hit a bug in CI:
https://github.com/containers/buildah/issues/3887
Unset envs to prevent error "sd-bus call: Transport endpoint is not connected"

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-07-14 11:47:50 +03:00
Sergey 2c88b822cf
Set localte in CI tests to en_US.UTF-8 (#450)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-07-14 11:35:47 +03:00
Sergey 33b28086ec
Release 1.9.4 version (#446)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-07-04 16:03:14 +03:00
Sergey db27c68ef9
Fix pod tests in CI (#445)
Remove 'net' from pod idempotency if it's not in inspection.
Probably a bug on Ubuntu.

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-07-04 15:46:35 +03:00
Sagi Shnaidman 75198ae574 Fix pod network idempotency
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-07-01 10:23:12 +03:00
Sagi Shnaidman 6c862b29e7 Fix pods list retrieve
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-07-01 10:23:12 +03:00
Sagi Shnaidman 542986cd8a Pass errors as a string instead of list 2022-07-01 10:23:12 +03:00
Sagi Shnaidman 3fe1edb5b4 Run CI on Ubuntu 22.04
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-07-01 10:23:12 +03:00
Rabi Mishra 6dc481ae2c
Change IpcMode default to shareable (#444)
podman 4.1.x has changed the ipc namespace mode default to
shareable[1] that results in containers being restarted.

[1] 3987c529f4

Resolves: rhbz#2101495
Signed-off-by: Rabi Mishra <ramishra@redhat.com>
2022-06-29 03:10:45 +03:00
Sergey 2cc1040f33
Use 2.13 Ansible version in CI jobs instead of 2.11 (#439)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-06-28 01:04:56 +03:00
Sergey 2577f5b0f5
Remove distutils as deprecated (#437)
Fix #422
The distutils package is deprecated and slated for removal in Python 3.12

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-06-12 22:54:03 +03:00
Cleber Rosa 1003e966ee
Add missing docstring for method that executes the podman commands (#436)
For completeness sake (and because I looked for it and did not find
it), this adds a docstring line for the "use_container_id" parameter.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
2022-06-11 14:35:29 +03:00
Sergey 25b9516488
Allow specify podman_network options MTU and VLAN separately (#435)
Before that it didn't work when only one option set.

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-06-08 19:37:06 +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
Clemens Lange b33a657f00
Fix idempotency for podman_login (#430)
Signed-off-by: Clemens Lange <clemens.lange@cern.ch>
2022-06-06 12:18:08 +03:00
Benjamin Schubert 15dae0d9ad
podman_container.py: Fix typo in the documentation (#424)
I believe "prefix" is what was meant here

Signed-off-by: Benjamin Schubert <contact@benschubert.me>
2022-05-22 15:08:16 +03:00
Oscar 20a982b564
Fix play_kube not working when yaml not installed on target (#415) (#419)
Signed-off-by: tcmal <oscar.shrimpton.personal@gmail.com>
2022-05-01 11:48:43 +03:00
Sergey 98c516292f
Fix internal networks idempotency (#421)
Remove logic with internal and dns, since Podman supports it in
recent versions.
Fix #350
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-04-28 00:56:22 +03:00
Sergey 848034096c
Disable memory idempotency (#420)
Because of complexity in Podman logic and calculations of b/m/g
etc let's disable this idempotency for now.
Fix #418

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-04-28 00:26:28 +03:00
Sergey e5d6136694
Change network attribute from str to list in pods #414 #416 (#417)
* Change network attribute from str to list in pods

Signed-off-by: André Cirne <dumahk21@gmail.com>

* Fix tests

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

Co-authored-by: André Cirne <dumahk21@gmail.com>
2022-04-25 02:15:29 +03:00
MasterWaldo b51dc5c814
Loop over image names when multiple images present in archive (#413)
Signed-off-by: Cory Prelerson <cprelerson42@gmail.com>
2022-04-24 22:38:53 +03:00
Sergey f1d68c0fbd
Release 1.9.3 version (#408)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-03-29 14:46:45 +03:00
Sergey fefc7e461f
Remove idempotency for log level (#404)
Since Podman changes its defaults very often and it's impossible
to track and identify every time what is current log level, let's
remove idempotency for this parameter for now.

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-03-29 14:15:16 +03:00
Sergey 91bd219067
Fix sanity issues with a new Ansible version (#405)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2022-03-29 11:47:42 +03:00
Henry78 4afd6bbd18
Podman Pod: Update examples to use quotes when publishing ports to avoid them being intrepreted as scalars. #394 (#401)
Signed-off-by: Henry <henry78@gmx.at>
2022-03-24 11:46:54 +02:00
359 changed files with 57823 additions and 16414 deletions

3
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,3 @@
# These are supported funding model platforms
github: [sshnaidm]

View File

@ -1,89 +0,0 @@
<!--
---------------------------------------------------
BUG REPORT INFORMATION
---------------------------------------------------
Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST
Please update your version of Podman Ansible modules to the latest possible and
retry your command before creating an issue.
-->
**Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)**
/kind bug
/kind feature
**Description**
<!--
Briefly describe the problem you are having in a few paragraphs.
-->
**Steps to reproduce the issue:**
1.
2.
3.
**Describe the results you received:**
**Describe the results you expected:**
**Additional information you deem important (e.g. issue happens only occasionally):**
**Version of the `containers.podman` collection:**
**Either git commit if installed from git: `git show --summary`**
**Or version from `ansible-galaxy` if installed from galaxy: `ansible-galaxy collection list | grep containers.podman`**
```
(paste your output here)
```
**Output of `ansible --version`:**
```
(paste your output here)
```
**Output of `podman version`:**
```
(paste your output here)
```
**Output of `podman info --debug`:**
``` yaml
(paste your output here)
```
**Package info (e.g. output of `rpm -q podman` or `apt list podman`):**
```
(paste your output here)
```
**Playbok you run with ansible (e.g. content of `playbook.yaml`):**
``` yaml
(paste your output here)
```
**Command line and output of ansible run with high verbosity**
**Please NOTE: if you submit a bug about idempotency, run the playbook with `--diff` option, like:**
`ansible-playbook -i inventory --diff -vv playbook.yml`
```
(paste your output here)
```
**Additional environment details (AWS, VirtualBox, physical, etc.):**

105
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@ -0,0 +1,105 @@
name: Bug Report
description: File a bug report
title: "[BUG]: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
Please update your version of Podman Ansible modules to the latest possible and retry your command before creating an issue.
- type: textarea
id: description
attributes:
label: Description
description: Briefly describe the problem you are having
placeholder: Tell us what you see!
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: What are the reproduction steps?
placeholder: |
1. Run command...
2. See error...
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behavior
description: What did you expect to happen?
validations:
required: true
- type: textarea
id: actual
attributes:
label: Actual behavior
description: What actually happened?
validations:
required: true
- type: textarea
id: collection-version
attributes:
label: Collection version
description: Output of `ansible-galaxy collection list | grep containers.podman` or `git show --summary`
render: shell
validations:
required: true
- type: textarea
id: ansible-version
attributes:
label: Ansible version
description: Output of `ansible --version`
render: shell
validations:
required: true
- type: textarea
id: podman-version
attributes:
label: Podman version
description: Output of `podman version`
render: shell
validations:
required: true
- type: textarea
id: playbook
attributes:
label: Playbook
description: Content of your playbook (use real values, not templated parameters like {{ variable_name }}!)
placeholder: |
- name: Create container
containers.podman.podman_container:
name: my-container
image: nginx:latest
state: present
render: yaml
validations:
required: false
- type: textarea
id: command-output
attributes:
label: Command output
description: Command line and output of ansible run with high verbosity (use `--diff -vv` for idempotency issues)
render: shell
validations:
required: false
- type: textarea
id: additional
attributes:
label: Additional information
description: Any additional information (environment details, package info, etc.)
validations:
required: false

View File

@ -0,0 +1,50 @@
name: Feature Request
description: Suggest an idea for this project
title: "[FEATURE]: "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for suggesting a new feature!
- type: textarea
id: problem
attributes:
label: Is your feature request related to a problem?
description: A clear and concise description of what the problem is
placeholder: I'm always frustrated when...
validations:
required: false
- type: textarea
id: solution
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered
validations:
required: false
- type: textarea
id: use-case
attributes:
label: Use case
description: Describe your use case and how this feature would help
validations:
required: false
- type: textarea
id: additional
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here
validations:
required: false

7
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,7 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

46
.github/pull_request_template.md vendored Normal file
View File

@ -0,0 +1,46 @@
# Type of change
Please select the type of change:
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] CI/CD improvements
- [ ] Refactoring
- [ ] Other: _____
## Description
Brief description of the changes...
## Motivation and context
Why is this change required? What problem does it solve?
Fixes issue #___
## How has this been tested?
Describe the tests that you ran to verify your changes:
- [ ] Unit tests
- [ ] Integration tests
- [ ] Manual testing
- [ ] Other: _____
## Checklist
- [ ] I have performed a self-review of my own code
- [ ] I have tested my changes thoroughly
- [ ] I have made corresponding changes to the documentation
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] If I used AI tools, I have disclosed their use in the description of my changes and reviewed the output for accuracy
## Breaking changes
If this is a breaking change, describe what breaks and how to migrate:
## Additional notes
Any additional information or notes for reviewers:

View File

@ -0,0 +1,468 @@
name: Podman Latest Build Testing
on:
schedule:
- cron: "0 4 * * *" # Run daily at 4:00 UTC
workflow_dispatch: # Allow manual triggering
pull_request:
paths:
- ".github/workflows/build_latest_podman.yml"
- 'ci/playbooks/containers/podman_container.yml'
- 'plugins/modules/podman_container.py'
- 'plugins/module_utils/podman/podman_container_lib.py'
- 'plugins/module_utils/podman/common.py'
- 'plugins/module_utils/podman/quadlet.py'
- 'plugins/modules/podman_container_info.py'
- 'tests/integration/targets/podman_container/**'
- 'tests/integration/targets/podman_container_idempotency/**'
jobs:
build-podman-from-source:
name: Build Podman from latest source
runs-on: ubuntu-24.04
outputs:
podman-version: ${{ steps.build-info.outputs.version }}
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: Install build dependencies and container runtimes
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
git \
libseccomp-dev \
libgpgme-dev \
libdevmapper-dev \
libsystemd-dev \
pkg-config \
uidmap \
libbtrfs-dev \
protobuf-compiler \
go-md2man \
runc \
conmon \
jq
echo "=== Installed runtime versions ==="
runc --version || echo "runc not available"
conmon --version || echo "conmon not available"
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Fix apparmor
run: |
sudo systemctl stop apparmor.service
#sudo aa-teardown || true
sudo sed -i "s@/usr/bin@/usr/local/bin@g" /etc/apparmor.d/podman
sudo apparmor_parser -r /etc/apparmor.d/podman || echo "AppArmor parser failed, continuing..."
- name: Clone Podman source and check dependencies
run: |
git clone https://github.com/containers/podman.git /tmp/podman
cd /tmp/podman
git log --oneline -1
echo "=== Checking dependency versions ==="
# Check go.mod for dependencies
if [ -f go.mod ]; then
echo "--- go.mod dependencies ---"
grep -E "(runc|conmon|crun)" go.mod || echo "No runtime deps found in go.mod"
fi
# Check docs for installation requirements
if [ -f docs/tutorials/podman-installation.md ]; then
echo "--- Installation docs ---"
grep -A5 -B5 -i "conmon\|runc\|crun" docs/tutorials/podman-installation.md || echo "No runtime info in installation docs"
fi
# Check Dockerfiles
find . -name "Dockerfile*" -exec echo "=== {} ===" \; -exec grep -i "conmon\|runc\|crun" {} \; 2>/dev/null || echo "No Dockerfiles with runtime info"
# Check CI setup scripts
find contrib -name "*.sh" -exec echo "=== {} ===" \; -exec grep -A3 -B3 -i "conmon\|runc\|crun" {} \; 2>/dev/null || echo "No CI scripts with runtime info"
# Check for any version files
find . -name "*version*" -o -name "*VERSION*" | head -5
- name: Build Podman from source
id: build-info
run: |
cd /tmp/podman
make BUILDTAGS="seccomp systemd"
sudo make install PREFIX=/usr/local
# Get version info
VERSION=$(/usr/local/bin/podman version --format "{{.Client.Version}}")
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Built Podman version: $VERSION"
# Verify installation
/usr/local/bin/podman --version
/usr/local/bin/podman info --format json | jq -r '.version.Version'
- name: Configure Podman for rootless
run: |
# Set up for rootless usage - use system newuidmap/newgidmap from uidmap package
sudo chmod 4755 /usr/bin/newgidmap || echo "newgidmap not found, continuing..."
sudo chmod 4755 /usr/bin/newuidmap || echo "newuidmap not found, continuing..."
# Configure subuid/subgid for runner user
echo "runner:100000:65536" | sudo tee -a /etc/subuid
echo "runner:100000:65536" | sudo tee -a /etc/subgid
# Create podman directories
mkdir -p ~/.config/containers
# Basic containers.conf with netavark configuration
cat > ~/.config/containers/containers.conf << EOF
[engine]
runtime = "runc"
helper_binaries_dir = ["/usr/lib/podman", "/usr/local/libexec/podman", "/usr/local/bin"]
EOF
sudo mkdir -p /etc/containers
sudo tee /etc/containers/policy.json > /dev/null <<'EOF'
{
"default": [
{
"type": "insecureAcceptAnything"
}
]
}
EOF
echo "Podman configured for rootless usage"
- name: Install deps for Podman
run: |
sudo apt-get update -y
sudo apt-get install -y uidmap \
slirp4netns catatonit netavark aardvark-dns passt conmon \
containernetworking-plugins crun
- name: Test Podman installation
run: |
/usr/local/bin/podman --version
/usr/local/bin/podman info
echo "=== Testing container runtime compatibility ==="
echo "Testing image pull and run functionality..."
# Test image pulling and running - this should fail the build if runtime is incompatible
/usr/local/bin/podman pull docker.io/library/hello-world:latest
/usr/local/bin/podman run --rm hello-world
# Additional runtime debugging
echo "=== Runtime debugging ==="
echo "Available runtimes:"
ls -la /usr/bin/runc /usr/local/bin/crun /usr/bin/crun 2>/dev/null || echo "Some runtimes not found"
echo "Default runtime in use:"
/usr/local/bin/podman info --format json | jq -r '.host.ociRuntime.name' || echo "Could not get runtime info"
- name: Create Podman artifact
run: |
mkdir -p podman-artifact
cp /usr/local/bin/podman podman-artifact/
cp /usr/local/bin/podman-remote podman-artifact/ || true
# cp /usr/local/libexec/podman/netavark podman-artifact/
echo "${{ steps.build-info.outputs.version }}" > podman-artifact/VERSION
- name: Upload Podman artifact
uses: actions/upload-artifact@v4
with:
name: podman-latest
path: podman-artifact/
retention-days: 1
test-podman-container-latest:
name: Podman container test with latest Podman
needs: build-podman-from-source
runs-on: ubuntu-24.04
continue-on-error: true # Don't fail the workflow if this job fails
strategy:
fail-fast: false
matrix:
ansible-version:
- git+https://github.com/ansible/ansible.git@stable-2.18
python-version:
- "3.12"
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Download Podman artifact
uses: actions/download-artifact@v5
with:
name: podman-latest
path: podman-artifact/
- name: Install deps for Podman
run: |
sudo apt-get update -y
sudo apt-get install -y uidmap \
slirp4netns catatonit netavark aardvark-dns passt conmon \
containernetworking-plugins crun
- name: Install custom Podman
run: |
sudo cp podman-artifact/podman /usr/local/bin/
sudo chmod +x /usr/local/bin/podman
if [ -f podman-artifact/podman-remote ]; then
sudo cp podman-artifact/podman-remote /usr/local/bin/
sudo chmod +x /usr/local/bin/podman-remote
fi
# Configure PATH to use our custom podman
echo "/usr/local/bin" >> $GITHUB_PATH
PODMAN_VERSION=$(cat podman-artifact/VERSION)
echo "PODMAN_VERSION=$PODMAN_VERSION" >> $GITHUB_ENV
- name: Configure Podman for testing
run: |
# Set up for rootless usage
# Configure subuid/subgid for runner user
echo "runner:100000:65536" | sudo tee -a /etc/subuid
echo "runner:100000:65536" | sudo tee -a /etc/subgid
# Create podman directories
mkdir -p ~/.config/containers
# Basic containers.conf with netavark configuration
cat > ~/.config/containers/containers.conf << EOF
[engine]
runtime = "runc"
helper_binaries_dir = ["/usr/lib/podman", "/usr/local/libexec/podman", "/usr/local/bin"]
EOF
sudo mkdir -p /etc/containers
sudo tee /etc/containers/policy.json > /dev/null <<'EOF'
{
"default": [
{
"type": "insecureAcceptAnything"
}
]
}
EOF
- name: Upgrade pip and install dependencies
run: |
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-podman-latest
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install collection
run: |
export PATH=~/.local/bin:$PATH
echo "Ansible version:"
~/.local/bin/ansible --version
echo "Podman version:"
podman --version
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run podman_container tests
run: |
export PATH=~/.local/bin:$PATH
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
echo "=== Environment Information ==="
echo "Podman version: $PODMAN_VERSION"
echo "Ansible version:"
ansible --version
echo "Python version:"
python --version
echo "================================"
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false \
-e podman_version_ubuntu=latest
echo "Running podman_container tests..."
ANSIBLECMD="ansible-playbook --skip-tags no_build_version " \
TEST2RUN=podman_container ./ci/run_containers_tests.sh
test-podman-idempotency-latest:
name: Podman Idempotency test with latest Podman
needs: build-podman-from-source
runs-on: ubuntu-24.04
continue-on-error: true # Don't fail the workflow if this job fails
strategy:
fail-fast: false
matrix:
ansible-version:
- git+https://github.com/ansible/ansible.git@stable-2.18
python-version:
- "3.12"
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Download Podman artifact
uses: actions/download-artifact@v5
with:
name: podman-latest
path: podman-artifact/
- name: Install deps for Podman
run: |
sudo apt-get update -y
sudo apt-get install -y uidmap \
slirp4netns catatonit netavark aardvark-dns passt conmon \
containernetworking-plugins crun
- name: Install custom Podman
run: |
sudo cp podman-artifact/podman /usr/local/bin/
sudo chmod +x /usr/local/bin/podman
if [ -f podman-artifact/podman-remote ]; then
sudo cp podman-artifact/podman-remote /usr/local/bin/
sudo chmod +x /usr/local/bin/podman-remote
fi
# Configure PATH to use our custom podman
echo "/usr/local/bin" >> $GITHUB_PATH
PODMAN_VERSION=$(cat podman-artifact/VERSION)
echo "PODMAN_VERSION=$PODMAN_VERSION" >> $GITHUB_ENV
- name: Configure Podman for testing
run: |
# Set up for rootless usage
# Configure subuid/subgid for runner user
echo "runner:100000:65536" | sudo tee -a /etc/subuid
echo "runner:100000:65536" | sudo tee -a /etc/subgid
# Create podman directories
mkdir -p ~/.config/containers
# Basic containers.conf with netavark configuration
cat > ~/.config/containers/containers.conf << EOF
[engine]
runtime = "runc"
helper_binaries_dir = ["/usr/lib/podman", "/usr/local/libexec/podman", "/usr/local/bin"]
EOF
sudo mkdir -p /etc/containers
sudo tee /etc/containers/policy.json > /dev/null <<'EOF'
{
"default": [
{
"type": "insecureAcceptAnything"
}
]
}
EOF
- name: Upgrade pip and install dependencies
run: |
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-podman-latest
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install collection
run: |
export PATH=~/.local/bin:$PATH
echo "Ansible version:"
~/.local/bin/ansible --version
echo "Podman version:"
podman --version
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run podman_container tests
run: |
export PATH=~/.local/bin:$PATH
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
echo "=== Environment Information ==="
echo "Podman version: $PODMAN_VERSION"
echo "Ansible version:"
ansible --version
echo "Python version:"
python --version
echo "================================"
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false \
-e podman_version_ubuntu=latest
echo "Running podman_container tests..."
ANSIBLECMD="ansible-playbook --skip-tags no_build_version " \
TEST2RUN=podman_container_idempotency ./ci/run_containers_tests.sh

View File

@ -13,20 +13,20 @@ jobs:
strategy:
matrix:
runner-os:
- ubuntu-20.04
- ubuntu-22.04
ansible-version:
- git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@stable-2.15
runner-python-version:
- 3.8
- 3.9
steps:
- name: Check out ${{ github.repository }} on disk
uses: actions/checkout@master
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.runner-python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.runner-python-version }}
- name: Set up pip cache
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('tests/sanity/requirements.txt') }}-${{ hashFiles('tests/unit/requirements.txt') }}
@ -41,7 +41,7 @@ jobs:
~/.local/bin/ansible-galaxy collection build --output-path
"${GITHUB_WORKSPACE}/.cache/collection-tarballs"
- name: Store migrated collection artifacts
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: collection
path: .cache/collection-tarballs
@ -55,28 +55,33 @@ jobs:
fail-fast: false
matrix:
runner-os:
- ubuntu-20.04
- ubuntu-22.04
runner-python-version:
- 3.8
- '3.11'
ansible-version:
- ansible<2.10
- git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@stable-2.18
- git+https://github.com/ansible/ansible.git@devel
python-version:
- 3.8
- '3.11'
include:
- runner-os: ubuntu-latest
runner-python-version: 2.7
ansible-version: ansible<2.10
python-version: 2.7
- runner-os: ubuntu-22.04
runner-python-version: '3.12'
ansible-version: git+https://github.com/ansible/ansible.git@devel
python-version: '3.12'
exclude:
- runner-os: ubuntu-22.04
runner-python-version: '3.11'
ansible-version: git+https://github.com/ansible/ansible.git@devel
python-version: '3.11'
steps:
- name: Set up Python ${{ matrix.runner-python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.runner-python-version }}
- name: Set up pip cache
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-sanity-containers
@ -87,7 +92,7 @@ jobs:
run: >-
python -m pip install --user '${{ matrix.ansible-version }}'
- name: Download migrated collection artifacts
uses: actions/download-artifact@v1
uses: actions/download-artifact@v5
with:
name: collection
path: .cache/collection-tarballs

View File

@ -8,7 +8,7 @@ on:
- 'contrib/publish-requirements.txt'
- 'contrib/publish.sh'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/collection-publish.yml'
@ -26,18 +26,18 @@ jobs:
strategy:
matrix:
runner-os:
- ubuntu-20.04
- ubuntu-22.04
ansible-version:
- git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@stable-2.15
runner-python-version:
- 3.9
steps:
- name: Check out ${{ github.repository }} on disk
uses: actions/checkout@master
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.runner-python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.runner-python-version }}

View File

@ -11,18 +11,18 @@ jobs:
strategy:
matrix:
runner-os:
- ubuntu-20.04
- ubuntu-22.04
ansible-version:
- git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@stable-2.15
runner-python-version:
- 3.9
steps:
- name: Check out ${{ github.repository }} on disk
uses: actions/checkout@master
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.runner-python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.runner-python-version }}

View File

@ -11,7 +11,7 @@ on:
- 'tests/integration/targets/connection/**'
- 'tests/integration/targets/connection_*/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/connections_tests.yml'
@ -31,20 +31,20 @@ jobs:
strategy:
matrix:
runner-os:
- ubuntu-20.04
- ubuntu-22.04
ansible-version:
- git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@stable-2.15
runner-python-version:
- 3.8
- 3.9
steps:
- name: Check out ${{ github.repository }} on disk
uses: actions/checkout@master
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.runner-python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.runner-python-version }}
- name: Set up pip cache
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('tests/sanity/requirements.txt') }}-${{ hashFiles('tests/unit/requirements.txt') }}
@ -59,16 +59,16 @@ jobs:
~/.local/bin/ansible-galaxy collection build --output-path
"${GITHUB_WORKSPACE}/.cache/collection-tarballs"
- name: Store migrated collection artifacts
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: collection
path: .cache/collection-tarballs
test-podman-connection:
name: Podman connection VM ${{ matrix.os || 'ubuntu-20.04' }}-${{ matrix.ansible-version }}
name: Podman connection VM ${{ matrix.os || 'ubuntu-22.04' }}-${{ matrix.ansible-version }}
needs:
- build-collection-artifact-connection-tests
runs-on: ${{ matrix.os || 'ubuntu-20.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash
@ -76,28 +76,35 @@ jobs:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
- git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@stable-2.17
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
#- ubuntu-20.04
- ubuntu-22.04
#- ubuntu-22.04
#- ubuntu-16.04
#- macos-latest
python-version:
- 3.8
#- 3.9
- "3.11"
# - 3.9
#- 3.6
#- 3.5
#- 2.7
include:
- os: ubuntu-22.04
ansible-version: git+https://github.com/ansible/ansible.git@devel
python-version: "3.12"
exclude:
- os: ubuntu-22.04
ansible-version: git+https://github.com/ansible/ansible.git@devel
python-version: "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
@ -108,7 +115,7 @@ jobs:
pip --version
- name: Set up pip cache
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
@ -120,7 +127,7 @@ jobs:
run: python -m pip install --user '${{ matrix.ansible-version }}'
- name: Download migrated collection artifacts
uses: actions/download-artifact@v1
uses: actions/download-artifact@v5
with:
name: collection
path: .cache/collection-tarballs
@ -133,9 +140,8 @@ jobs:
run: |
export PATH=~/.local/bin:$PATH
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
if [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
@ -156,10 +162,10 @@ jobs:
shell: bash
test-buildah-connection:
name: Buildah connection VM ${{ matrix.os || 'ubuntu-20.04' }}-${{ matrix.ansible-version }}
name: Buildah connection VM ${{ matrix.os || 'ubuntu-22.04' }}-${{ matrix.ansible-version }}
needs:
- build-collection-artifact-connection-tests
runs-on: ${{ matrix.os || 'ubuntu-20.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash
@ -167,28 +173,35 @@ jobs:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
- git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@stable-2.18
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
#- ubuntu-20.04
- ubuntu-22.04
#- ubuntu-22.04
#- ubuntu-16.04
#- macos-latest
python-version:
- 3.8
#- 3.9
- "3.11"
#- 3.6
#- 3.5
#- 2.7
include:
- os: ubuntu-22.04
ansible-version: git+https://github.com/ansible/ansible.git@devel
python-version: "3.12"
exclude:
- os: ubuntu-22.04
ansible-version: git+https://github.com/ansible/ansible.git@devel
python-version: "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
@ -199,7 +212,7 @@ jobs:
pip --version
- name: Set up pip cache
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
@ -211,7 +224,7 @@ jobs:
run: python -m pip install --user '${{ matrix.ansible-version }}'
- name: Download migrated collection artifacts
uses: actions/download-artifact@v1
uses: actions/download-artifact@v5
with:
name: collection
path: .cache/collection-tarballs
@ -224,9 +237,8 @@ jobs:
run: |
export PATH=~/.local/bin:$PATH
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
if [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi

View File

@ -10,10 +10,11 @@ on:
- 'plugins/modules/podman_container.py'
- 'plugins/module_utils/podman/podman_container_lib.py'
- 'plugins/module_utils/podman/common.py'
- 'plugins/module_utils/podman/quadlet.py'
- 'plugins/modules/podman_container_info.py'
- 'tests/integration/targets/podman_container/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_container.yml'
@ -23,6 +24,7 @@ on:
- 'plugins/modules/podman_container.py'
- 'plugins/module_utils/podman/podman_container_lib.py'
- 'plugins/module_utils/podman/common.py'
- 'plugins/module_utils/podman/quadlet.py'
- 'plugins/modules/podman_container_info.py'
- 'tests/integration/targets/podman_container/**'
schedule:
@ -31,8 +33,8 @@ on:
jobs:
test_podman_container:
name: Podman container ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
name: Podman container ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}-${{ matrix.podman-version || 'unstable' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash
@ -40,22 +42,36 @@ jobs:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
- git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@stable-2.12
- git+https://github.com/ansible/ansible.git@stable-2.18
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
- ubuntu-22.04
python-version:
- 3.9
- "3.11"
podman-version:
- unstable
include:
- os: ubuntu-22.04
ansible-version: git+https://github.com/ansible/ansible.git@stable-2.18
python-version: "3.11"
podman-version: stable
- os: ubuntu-22.04
ansible-version: git+https://github.com/ansible/ansible.git@devel
python-version: "3.12"
podman-version: unstable
exclude:
- os: ubuntu-22.04
ansible-version: git+https://github.com/ansible/ansible.git@devel
python-version: "3.11"
podman-version: unstable
steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
@ -68,7 +84,7 @@ jobs:
pip --version
- name: Set up pip cache
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
@ -94,9 +110,8 @@ jobs:
run: |
export PATH=~/.local/bin:$PATH
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
if [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
@ -110,90 +125,8 @@ jobs:
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_container ./ci/run_containers_tests.sh
shell: bash
test_podman_container_with_pip:
name: Podman container w/ pip ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
#- git+https://github.com/ansible/ansible.git@stable-2.10
os:
- ubuntu-20.04
python-version:
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
python3 -m pip install --user --force-reinstall --upgrade .
- name: Run collection tests for podman container
run: |
export PATH=~/.local/bin:$PATH
export ANSIBLE_COLLECTIONS_PATHS=~/.local/share/ansible/collections
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
-e setup_python=false \
-e podman_version_ubuntu=${{ matrix.podman-version }}
TEST2RUN=podman_container ./ci/run_containers_tests.sh
shell: bash

View File

@ -0,0 +1,32 @@
name: Podman Container Copy module
on:
push:
paths:
- '.github/workflows/podman_container_copy.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_container_copy.yml'
- 'plugins/modules/podman_container_copy.py'
- 'tests/integration/targets/podman_container_copy/**'
branches:
- main
pull_request:
paths:
- '.github/workflows/podman_container_copy.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_container_copy.yml'
- 'plugins/modules/podman_container_copy.py'
- 'tests/integration/targets/podman_container_copy/**'
schedule:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_container_copy:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_container_copy'
display_name: 'Podman Container Copy module'

View File

@ -0,0 +1,32 @@
name: Podman container exec
on:
push:
paths:
- '.github/workflows/podman_container_exec.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_container_exec.yml'
- 'plugins/modules/podman_container_exec.py'
- 'tests/integration/targets/podman_container_exec/**'
branches:
- main
pull_request:
paths:
- '.github/workflows/podman_container_exec.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_container_exec.yml'
- 'plugins/modules/podman_container_exec.py'
- 'tests/integration/targets/podman_container_exec/**'
schedule:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_container_exec:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_container_exec'
display_name: 'Podman container exec'

View File

@ -12,7 +12,7 @@ on:
- 'plugins/module_utils/podman/common.py'
- 'tests/integration/targets/podman_container_idempotency/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_container_idem.yml'
@ -27,96 +27,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_container_idem:
name: Podman container ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
python-version:
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: |
python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run preparing tests for podman container
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
shell: bash
- name: Run idempotency tests for podman container
run: |
export PATH=~/.local/bin:$PATH
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
TEST2RUN=podman_container_idempotency ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_container_idempotency'
display_name: 'Idempotency'

View File

@ -4,6 +4,7 @@ on:
push:
paths:
- '.github/workflows/podman_container_info.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_container_info.yml'
@ -13,10 +14,11 @@ on:
- 'plugins/modules/podman_container_info.py'
- 'tests/integration/targets/podman_container_info/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_container_info.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_container_info.yml'
@ -29,86 +31,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_container_info:
name: Podman container info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-latest
python-version:
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run collection tests for podman container info
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_container_info ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_container_info'
display_name: 'Podman container info'

View File

@ -4,6 +4,7 @@ on:
push:
paths:
- '.github/workflows/podman_containers.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_containers.yml'
@ -13,13 +14,14 @@ on:
- 'plugins/modules/podman_containers.py'
- 'tests/integration/targets/podman_containers/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_containers.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_container.yml'
- 'ci/playbooks/containers/podman_containers.yml'
- 'plugins/modules/podman_container.py'
- 'plugins/module_utils/podman/podman_container_lib.py'
- 'plugins/module_utils/podman/common.py'
@ -29,88 +31,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_containers:
name: Podman multi containers ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
- git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@stable-2.12
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
python-version:
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run collection tests for podman containers
run: |
export PATH=~/.local/bin:$PATH
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_containers ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_containers'
display_name: 'Podman multi-containers'

View File

@ -4,16 +4,18 @@ on:
push:
paths:
- '.github/workflows/podman_export.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_export.yml'
- 'plugins/modules/podman_export.py'
- 'tests/integration/targets/podman_export/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_export.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_export.yml'
@ -23,86 +25,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_export:
name: Podman export ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
python-version:
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run collection tests for podman export
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_export ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_export'
display_name: 'Podman export'

View File

@ -0,0 +1,32 @@
name: Podman generate systemd
on:
push:
paths:
- '.github/workflows/podman_generate_systemd.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_generate_systemd.yml'
- 'plugins/modules/podman_generate_systemd.py'
- 'tests/integration/targets/podman_generate_systemd/**'
branches:
- main
pull_request:
paths:
- '.github/workflows/podman_generate_systemd.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_generate_systemd.yml'
- 'plugins/modules/podman_generate_systemd.py'
- 'tests/integration/targets/podman_generate_systemd/**'
schedule:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_generate_systemd:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_generate_systemd'
display_name: 'Podman generate systemd'

View File

@ -4,107 +4,36 @@ on:
push:
paths:
- '.github/workflows/podman_image.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_image.yml'
- 'plugins/modules/podman_image.py'
- 'plugins/modules/podman_image_info.py'
- 'plugins/module_utils/podman/quadlet.py'
- 'plugins/module_utils/podman/podman_image_lib.py'
- 'tests/integration/targets/podman_image/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_image.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_image.yml'
- 'plugins/modules/podman_image.py'
- 'plugins/modules/podman_image_info.py'
- 'plugins/module_utils/podman/quadlet.py'
- 'plugins/module_utils/podman/podman_image_lib.py'
- 'tests/integration/targets/podman_image/**'
schedule:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_image:
name: Podman image ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
python-version:
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run collection tests for podman image
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_image ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_image'
display_name: 'Podman image'
extra_collections: 'ansible.posix'

View File

@ -4,107 +4,34 @@ on:
push:
paths:
- '.github/workflows/podman_image_info.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_image_info.yml'
- 'plugins/modules/podman_image.py'
- 'plugins/modules/podman_image_info.py'
- 'plugins/module_utils/podman/podman_image_lib.py'
- 'tests/integration/targets/podman_image_info/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_image_info.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_image_info.yml'
- 'plugins/modules/podman_image.py'
- 'plugins/modules/podman_image_info.py'
- 'plugins/module_utils/podman/podman_image_lib.py'
- 'tests/integration/targets/podman_image_info/**'
schedule:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_image_info:
name: Podman image info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
python-version:
- 3.9
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_image_info'
display_name: 'Podman image info'
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run collection tests for podman image info
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_image_info ./ci/run_containers_tests.sh
shell: bash

View File

@ -4,16 +4,18 @@ on:
push:
paths:
- '.github/workflows/podman_import.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_import.yml'
- 'plugins/modules/podman_import.py'
- 'tests/integration/targets/podman_import/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_import.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_import.yml'
@ -23,86 +25,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_import:
name: Podman import ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
python-version:
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run collection tests for podman import
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_import ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_import'
display_name: 'Podman import'

View File

@ -4,16 +4,18 @@ on:
push:
paths:
- '.github/workflows/podman_load.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_load.yml'
- 'plugins/modules/podman_load.py'
- 'tests/integration/targets/podman_load/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_load.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_load.yml'
@ -23,86 +25,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_load:
name: Podman load ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
python-version:
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run collection tests for podman load
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_load ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_load'
display_name: 'Podman load'

View File

@ -4,16 +4,18 @@ on:
push:
paths:
- '.github/workflows/podman_login.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_login.yml'
- 'plugins/modules/podman_login.py'
- 'tests/integration/targets/podman_login/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_login.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_login.yml'
@ -23,86 +25,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_login:
name: Podman login ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
python-version:
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run collection tests for Podman login
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_login ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_login'
display_name: 'Podman login'

View File

@ -4,16 +4,18 @@ on:
push:
paths:
- '.github/workflows/podman_login_info.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_login_info.yml'
- 'plugins/modules/podman_login_info.py'
- 'tests/integration/targets/podman_login_info/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_login_info.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_login_info.yml'
@ -23,86 +25,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_login_info:
name: Podman login info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
python-version:
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run collection tests for podman login info
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_login_info ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_login_info'
display_name: 'Podman login info'

View File

@ -4,16 +4,18 @@ on:
push:
paths:
- '.github/workflows/podman_logout.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_logout.yml'
- 'plugins/modules/podman_logout.py'
- 'tests/integration/targets/podman_logout/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_logout.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_logout.yml'
@ -23,86 +25,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_logout:
name: Podman logout ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
python-version:
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run collection tests for podman logout
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_logout ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_logout'
display_name: 'Podman logout'

View File

@ -4,105 +4,31 @@ on:
push:
paths:
- '.github/workflows/podman_network.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_network.yml'
- 'plugins/modules/podman_network.py'
- 'plugins/module_utils/podman/quadlet.py'
- 'tests/integration/targets/podman_network/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_network.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_network.yml'
- 'plugins/modules/podman_network.py'
- 'plugins/module_utils/podman/quadlet.py'
- 'tests/integration/targets/podman_network/**'
schedule:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_network:
name: Podman network ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
python-version:
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run collection tests for podman network
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_network ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_network'
display_name: 'Podman network'

View File

@ -4,16 +4,18 @@ on:
push:
paths:
- '.github/workflows/podman_network_info.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_network_info.yml'
- 'plugins/modules/podman_network_info.py'
- 'tests/integration/targets/podman_network_info/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_network_info.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_network_info.yml'
@ -23,86 +25,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_network_info:
name: Podman network info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
python-version:
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run collection tests for podman network info
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_network_info ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_network_info'
display_name: 'Podman network info'

View File

@ -8,9 +8,10 @@ on:
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_play.yml'
- 'plugins/modules/podman_play.py'
- 'plugins/module_utils/podman/quadlet.py'
- 'tests/integration/targets/podman_play/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_play.yml'
@ -18,92 +19,14 @@ on:
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_play.yml'
- 'plugins/modules/podman_play.py'
- 'plugins/module_utils/podman/quadlet.py'
- 'tests/integration/targets/podman_play/**'
schedule:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_play:
name: Podman play ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
python-version:
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run collection tests for podman play
run: |
export PATH=~/.local/bin:$PATH
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_play ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_play'
display_name: 'Podman play'

View File

@ -8,11 +8,13 @@ on:
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_pod.yml'
- 'plugins/module_utils/podman/podman_pod_lib.py'
- 'plugins/module_utils/podman/common.py'
- 'plugins/module_utils/podman/quadlet.py'
- 'plugins/modules/podman_pod.py'
- 'plugins/modules/podman_pod_info.py'
- 'tests/integration/targets/podman_pod/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_pod.yml'
@ -20,6 +22,8 @@ on:
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_pod.yml'
- 'plugins/module_utils/podman/podman_pod_lib.py'
- 'plugins/module_utils/podman/common.py'
- 'plugins/module_utils/podman/quadlet.py'
- 'plugins/modules/podman_pod.py'
- 'plugins/modules/podman_pod_info.py'
- 'tests/integration/targets/podman_pod/**'
@ -27,87 +31,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_pod:
name: Podman pod ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
python-version:
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run collection tests for podman pod
run: |
export PATH=~/.local/bin:$PATH
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_pod ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_pod'
display_name: 'Podman pod'

View File

@ -12,7 +12,7 @@ on:
- 'plugins/modules/podman_pod_info.py'
- 'tests/integration/targets/podman_pod_info/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_pod_info.yml'
@ -27,87 +27,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_pod_info:
name: Podman pod info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
python-version:
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run collection tests for podman pod info
run: |
export PATH=~/.local/bin:$PATH
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_pod_info ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_pod_info'
display_name: 'Podman pod info'

32
.github/workflows/podman_prune.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: Podman prune
on:
push:
paths:
- '.github/workflows/podman_prune.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_prune.yml'
- 'plugins/modules/podman_prune.py'
- 'tests/integration/targets/podman_prune/**'
branches:
- main
pull_request:
paths:
- '.github/workflows/podman_prune.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_prune.yml'
- 'plugins/modules/podman_prune.py'
- 'tests/integration/targets/podman_prune/**'
schedule:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_prune:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_prune'
display_name: 'Podman prune'

32
.github/workflows/podman_runlabel.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: Podman runlabel module
on:
push:
paths:
- '.github/workflows/podman_runlabel.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_runlabel.yml'
- 'plugins/modules/podman_runlabel.py'
- 'tests/integration/targets/podman_runlabel/**'
branches:
- main
pull_request:
paths:
- '.github/workflows/podman_runlabel.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_runlabel.yml'
- 'plugins/modules/podman_runlabel.py'
- 'tests/integration/targets/podman_runlabel/**'
schedule:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_runlabel:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_runlabel'
display_name: 'Podman runlabel module'

View File

@ -4,16 +4,18 @@ on:
push:
paths:
- '.github/workflows/podman_save.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_save.yml'
- 'plugins/modules/podman_save.py'
- 'tests/integration/targets/podman_save/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_save.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_save.yml'
@ -23,86 +25,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_save:
name: Podman save ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
python-version:
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run collection tests for podman save
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_save ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_save'
display_name: 'Podman save'

32
.github/workflows/podman_search.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: Podman search
on:
push:
paths:
- '.github/workflows/podman_search.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_search.yml'
- 'plugins/modules/podman_search.py'
- 'tests/integration/targets/podman_search/**'
branches:
- main
pull_request:
paths:
- '.github/workflows/podman_search.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_search.yml'
- 'plugins/modules/podman_search.py'
- 'tests/integration/targets/podman_search/**'
schedule:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_search:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_search'
display_name: 'Podman search'

View File

@ -4,6 +4,7 @@ on:
push:
paths:
- '.github/workflows/podman_secret.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_secret.yml'
@ -11,10 +12,11 @@ on:
- 'plugins/modules/podman_container.py'
- 'plugins/module_utils/podman/podman_container_lib.py'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_secret.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_secret.yml'
@ -25,170 +27,9 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_secret:
name: Podman secret ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
- git+https://github.com/ansible/ansible.git@stable-2.12
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
python-version:
- 3.9
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_secret'
display_name: 'Podman secret'
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run collection tests for podman secret
run: |
export PATH=~/.local/bin:$PATH
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_secret ./ci/run_containers_tests.sh
shell: bash
test_podman_secret_with_pip:
name: Podman secret w/ pip ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
#- git+https://github.com/ansible/ansible.git@stable-2.10
os:
- ubuntu-20.04
python-version:
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
python3 -m pip install --user --force-reinstall --upgrade .
- name: Run collection tests for podman secret
run: |
export PATH=~/.local/bin:$PATH
export ANSIBLE_COLLECTIONS_PATHS=~/.local/share/ansible/collections
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_secret ./ci/run_containers_tests.sh
shell: bash

View File

@ -0,0 +1,32 @@
name: Podman secret info
on:
push:
paths:
- '.github/workflows/podman_secret_info.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_secret_info.yml'
- 'plugins/modules/podman_secret.py'
- 'plugins/modules/podman_secret_info.py'
branches:
- main
pull_request:
paths:
- '.github/workflows/podman_secret_info.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_secret_info.yml'
- 'plugins/modules/podman_secret.py'
- 'plugins/modules/podman_secret_info.py'
schedule:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_secret_info:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_secret_info'
display_name: 'Podman secret info'

View File

@ -0,0 +1,32 @@
name: Podman system connection
on:
push:
paths:
- '.github/workflows/podman_system_connection.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_system_connection.yml'
- 'plugins/modules/podman_system_connection.py'
- 'tests/integration/targets/podman_system_connection/**'
branches:
- main
pull_request:
paths:
- '.github/workflows/podman_system_connection.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_system_connection.yml'
- 'plugins/modules/podman_system_connection.py'
- 'tests/integration/targets/podman_system_connection/**'
schedule:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_system_connection:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_system_connection'
display_name: 'Podman system connection'

View File

@ -0,0 +1,32 @@
name: Podman system connection info
on:
push:
paths:
- '.github/workflows/podman_system_connection_info.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_system_connection_info.yml'
- 'plugins/modules/podman_system_connection_info.py'
- 'tests/integration/targets/podman_system_connection_info/**'
branches:
- main
pull_request:
paths:
- '.github/workflows/podman_system_connection_info.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_system_connection_info.yml'
- 'plugins/modules/podman_system_connection_info.py'
- 'tests/integration/targets/podman_system_connection_info/**'
schedule:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_system_connection_info:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_system_connection_info'
display_name: 'Podman system connection info'

View File

@ -0,0 +1,30 @@
name: Podman system info
on:
push:
paths:
- '.github/workflows/podman_system_info.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_system_info.yml'
- 'plugins/modules/podman_system_info.py'
- 'tests/integration/targets/podman_system_info/**'
branches:
- main
pull_request:
paths:
- '.github/workflows/podman_system_info.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_system_info.yml'
- 'plugins/modules/podman_system_info.py'
- 'tests/integration/targets/podman_system_info/**'
schedule:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_system_info:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_system_info'
display_name: 'Podman system info'

View File

@ -4,16 +4,18 @@ on:
push:
paths:
- '.github/workflows/podman_tag.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_tag.yml'
- 'plugins/modules/podman_tag.py'
- 'tests/integration/targets/podman_tag/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_tag.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_tag.yml'
@ -23,86 +25,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_tag:
name: Podman tag ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
python-version:
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run collection tests for podman tag
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_tag ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_tag'
display_name: 'Podman tag'

View File

@ -4,105 +4,31 @@ on:
push:
paths:
- '.github/workflows/podman_volume.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_volume.yml'
- 'plugins/modules/podman_volume.py'
- 'plugins/module_utils/podman/quadlet.py'
- 'tests/integration/targets/podman_volume/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_volume.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_volume.yml'
- 'plugins/modules/podman_volume.py'
- 'plugins/module_utils/podman/quadlet.py'
- 'tests/integration/targets/podman_volume/**'
schedule:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_volume:
name: Podman volume ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
python-version:
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run collection tests for podman volume info
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_volume ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_volume'
display_name: 'Podman volume'

View File

@ -4,6 +4,7 @@ on:
push:
paths:
- '.github/workflows/podman_volume_info.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_volume_info.yml'
@ -11,10 +12,11 @@ on:
- 'plugins/modules/podman_volume.py'
- 'tests/integration/targets/podman_volume_info/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_volume_info.yml'
- '.github/workflows/reusable-module-test.yml'
- 'ci/*.yml'
- 'ci/run_containers_tests.sh'
- 'ci/playbooks/containers/podman_volume_info.yml'
@ -25,86 +27,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_volume_info:
name: Podman volume info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-20.04
python-version:
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run collection tests for podman volume info
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_volume_info ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_volume_info'
display_name: 'Podman volume info'

View File

@ -0,0 +1,118 @@
name: Reusable Module Test
on:
workflow_call:
inputs:
module_name:
description: 'The name of the Podman module to test (e.g., podman_export)'
required: true
type: string
display_name:
description: 'Display name for the module (e.g., Podman export)'
required: false
type: string
default: ''
python_version:
description: 'Python version to use for testing'
required: false
type: string
default: '3.12'
os_matrix:
description: 'OS matrix as JSON string'
required: false
type: string
default: '["ubuntu-22.04"]'
ansible_versions:
description: 'Ansible versions matrix as JSON string'
required: false
type: string
default: '["git+https://github.com/ansible/ansible.git@stable-2.18", "git+https://github.com/ansible/ansible.git@devel"]'
extra_collections:
description: 'Space-separated list of extra Ansible collections to install before running tests (e.g., "ansible.posix community.general")'
required: false
type: string
default: ''
jobs:
test_module:
name: ${{ inputs.display_name || inputs.module_name }} ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version: ${{ fromJSON(inputs.ansible_versions) }}
os: ${{ fromJSON(inputs.os_matrix) }}
python-version:
- ${{ inputs.python_version }}
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Install extra Ansible collections (optional)
if: ${{ inputs.extra_collections != '' }}
run: |
echo "Installing extra collections: ${{ inputs.extra_collections }}"
~/.local/bin/ansible-galaxy collection install -vvv --force ${{ inputs.extra_collections }}
- name: Run collection tests for ${{ inputs.module_name }}
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
if [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=${{ inputs.module_name }} ./ci/run_containers_tests.sh
shell: bash

View File

@ -0,0 +1,358 @@
name: Test inventory and example playbooks
on:
pull_request:
paths:
- '.github/workflows/test-inventory-examples.yml'
- 'plugins/inventory/podman_containers.py'
- 'plugins/inventory/buildah_containers.py'
- 'tests/unit/plugins/inventory/*.py'
push:
paths:
- '.github/workflows/test-inventory-examples.yml'
- 'plugins/inventory/podman_containers.py'
- 'plugins/inventory/buildah_containers.py'
- 'tests/unit/plugins/inventory/*.py'
branches: [ main ]
schedule:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
inventory_test:
name: Functional inventory tests
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Ansible 2.18
run: python3 -m pip install --user --force-reinstall --upgrade ansible-core==2.18
- name: Build and install the collection tarball
run: |
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Install system deps (podman, buildah)
run: |
sudo apt-get update
sudo apt-get install -y podman buildah jq
podman --version
buildah --version
- name: Configure rootless storage
run: |
mkdir -p ~/.config/containers
printf '[storage]\ndriver = "overlay"\n' > ~/.config/containers/storage.conf
printf '[engine]\ncgroup_manager = "cgroupfs"\nevents_logger = "file"\n' > ~/.config/containers/engine.conf
- name: Install Ansible
run: |
python -m pip install --upgrade pip
python -m pip install ansible-core
ansible --version
- name: Build basic containers for discovery
run: |
podman pull alpine:latest
podman run -d --name podman-inventory-test alpine:latest sleep 3600
podman run -d --name podman-inventory-test2 --label role=api --label env=dev alpine:latest sleep 3600
podman run -d --name podman-stopped-test alpine:latest sleep 3600 && podman stop podman-stopped-test
buildah from --name hello-buildah alpine:latest
echo 'Podman ps output:'
podman ps -a --format json | jq '.'
echo 'Buildah containers output:'
buildah containers -a --json | jq '.'
- name: Write podman inventory source
run: |
mkdir -p ci/tmpinv
cat > ci/tmpinv/podman.yml <<'EOF'
plugin: containers.podman.podman_containers
include_stopped: false
connection_plugin: containers.podman.podman
EOF
- name: Write buildah inventory source
run: |
cat > ci/tmpinv/buildah.yml <<'EOF'
plugin: containers.podman.buildah_containers
connection_plugin: containers.podman.buildah
EOF
- name: Sanity check podman inventory
run: |
out=$(ANSIBLE_INVENTORY_ENABLED=containers.podman.podman_containers,yaml,ini ansible-inventory -i ci/tmpinv/podman.yml --list)
echo "$out" | jq '.'
echo "$out" | jq -e '. | to_entries | any(.value.hosts != null and (.value.hosts | length) > 0)'
- name: Test podman inventory - empty selection with name_patterns
run: |
cat > ci/tmpinv/podman_empty.yml <<'EOF'
plugin: containers.podman.podman_containers
name_patterns: ['no-such-*']
EOF
out=$(ANSIBLE_INVENTORY_ENABLED=containers.podman.podman_containers,yaml,ini ansible-inventory -i ci/tmpinv/podman_empty.yml --list)
echo "$out" | jq '.'
# Expect no groups with hosts
test $(echo "$out" | jq '[ . | to_entries[] | select(.value.hosts != null and (.value.hosts | length) > 0) ] | length') -eq 0
- name: Test podman include_stopped false excludes stopped
run: |
cat > ci/tmpinv/podman_running.yml <<'EOF'
plugin: containers.podman.podman_containers
include_stopped: false
EOF
out=$(ANSIBLE_INVENTORY_ENABLED=containers.podman.podman_containers,yaml,ini ansible-inventory -i ci/tmpinv/podman_running.yml --list)
echo "$out" | jq '.'
# Stopped host must not be present in hostvars
echo "$out" | jq -e '._meta.hostvars | has("podman-stopped-test") | not'
- name: Test podman include_stopped true includes stopped
run: |
cat > ci/tmpinv/podman_all.yml <<'EOF'
plugin: containers.podman.podman_containers
include_stopped: true
EOF
out=$(ANSIBLE_INVENTORY_ENABLED=containers.podman.podman_containers,yaml,ini ansible-inventory -i ci/tmpinv/podman_all.yml --list)
echo "$out" | jq '.'
# Stopped host must be present in hostvars
echo "$out" | jq -e '._meta.hostvars | has("podman-stopped-test")'
- name: Test label_selectors and group_by_image/label
run: |
cat > ci/tmpinv/podman_labels.yml <<'EOF'
plugin: containers.podman.podman_containers
label_selectors:
role: api
group_by_image: true
group_by_label: ['env']
EOF
out=$(ANSIBLE_INVENTORY_ENABLED=containers.podman.podman_containers,yaml,ini ansible-inventory -i ci/tmpinv/podman_labels.yml --list)
echo "$out" | jq '.'
# Only labeled host present
echo "$out" | jq -e '._meta.hostvars | has("podman-inventory-test2")'
echo "$out" | jq -e '._meta.hostvars | has("podman-inventory-test") | not'
# Image group exists
echo "$out" | jq -e '."image_docker.io_library_alpine_latest".hosts | index("podman-inventory-test2") != null'
# Label group exists
echo "$out" | jq -e '."label_env_dev".hosts | index("podman-inventory-test2") != null'
- name: Test verbose_output and filters include/exclude
run: |
cat > ci/tmpinv/podman_filters.yml <<'EOF'
plugin: containers.podman.podman_containers
include_stopped: true
verbose_output: true
filters:
exclude:
status: 'Exited*'
EOF
out=$(ANSIBLE_INVENTORY_ENABLED=containers.podman.podman_containers,yaml,ini ansible-inventory -i ci/tmpinv/podman_filters.yml --list)
echo "$out" | jq '.'
# Exited (stopped) should be excluded
echo "$out" | jq -e '._meta.hostvars | has("podman-stopped-test") | not'
# podman_ps should exist for a running host
echo "$out" | jq -e '._meta.hostvars["podman-inventory-test"] | has("podman_ps")'
- name: Test keyed_groups with prefix/separator/default and parent_group
run: |
cat > ci/tmpinv/podman_keyed.yml <<'EOF'
plugin: containers.podman.podman_containers
keyed_groups:
- key: labels.role
prefix: k
separator: '-'
parent_group: keyed
- key: labels.missing
prefix: missing
default_value: unknown
leading_separator: false
trailing_separator: false
EOF
out=$(ANSIBLE_INVENTORY_ENABLED=containers.podman.podman_containers,yaml,ini ansible-inventory -i ci/tmpinv/podman_keyed.yml --list)
echo "$out" | jq '.'
# Group from labels.role
echo "$out" | jq -e '."k_api".hosts | index("podman-inventory-test2") != null'
# Parent group exists and contains subgroup
echo "$out" | jq -e '((.keyed.children | type) == "array" and (.keyed.children | index("k_api") != null)) or ((.keyed.children | type) == "object" and (.keyed.children | has("k_api")))'
# Default value group for missing key exists for at least one host
test $(echo "$out" | jq 'to_entries | map(select(.key | startswith("missing"))) | length') -ge 1
- name: Verbose logs - podman inventory (-vvvv) name_patterns and label_selectors
run: |
# Create an inventory that will: match only podman-inventory-test (not test2) by name_patterns,
# then filter it out by label_selectors; the unmatched one will be filtered by name_patterns.
cat > ci/tmpinv/podman_verbose.yml <<'EOF'
plugin: containers.podman.podman_containers
include_stopped: true
name_patterns: ['podman-inventory-test']
label_selectors:
role: api
EOF
set -o pipefail
ANSIBLE_INVENTORY_ENABLED=containers.podman.podman_containers,yaml,ini \
ansible-inventory -i ci/tmpinv/podman_verbose.yml --list -vvvv 1>/tmp/podman_verbose.out 2>/tmp/podman_verbose.err || true
echo "podman_verbose.err:"
cat /tmp/podman_verbose.err
echo "podman_verbose.out:"
cat /tmp/podman_verbose.out
# Expect messages from plugin
grep -q "Filtered out podman-inventory-test2 by name_patterns option" /tmp/podman_verbose.out
grep -q "Filtered out podman-inventory-test by label_selectors option" /tmp/podman_verbose.out
- name: Verbose logs - podman inventory (-vvvv) filters include path
run: |
# Match only the labeled container and then filter it via filters.include
cat > ci/tmpinv/podman_verbose_filters.yml <<'EOF'
plugin: containers.podman.podman_containers
include_stopped: true
name_patterns: ['podman-inventory-test2']
filters:
include:
status: 'Exited*'
EOF
set -o pipefail
ANSIBLE_INVENTORY_ENABLED=containers.podman.podman_containers,yaml,ini \
ansible-inventory -i ci/tmpinv/podman_verbose_filters.yml --list -vvvv 1>/tmp/podman_verbose2.out 2>/tmp/podman_verbose2.err || true
echo "podman_verbose2.err:"
cat /tmp/podman_verbose2.err
echo "podman_verbose2.out:"
cat /tmp/podman_verbose2.out
grep -q "Filtered out podman-inventory-test2 by filters option" /tmp/podman_verbose2.out
- name: Test strict=true fails on missing keyed key
run: |
set +e
cat > ci/tmpinv/podman_strict.yml <<'EOF'
plugin: containers.podman.podman_containers
strict: true
keyed_groups:
- key: labels.nonexistent
EOF
ANSIBLE_INVENTORY_ENABLED=containers.podman.podman_containers,yaml,ini ansible-inventory -i ci/tmpinv/podman_strict.yml --list >/tmp/out.json 2>/tmp/err.log
rc=$?
echo "RC=$rc"; cat /tmp/err.log || true
# Some ansible-core versions still exit 0 after parser fallbacks; assert on error message instead
grep -q "Missing keyed_groups key 'labels.nonexistent'" /tmp/err.log
- name: Sanity check buildah inventory
run: |
out=$(ANSIBLE_INVENTORY_ENABLED=containers.podman.buildah_containers,yaml,ini ansible-inventory -i ci/tmpinv/buildah.yml --list)
echo "$out" | jq '.'
echo "$out" | jq -e '. | to_entries | any(.value.hosts != null and (.value.hosts | length) > 0)'
- name: Verbose logs - buildah inventory (-vvvv) name_patterns filter path
run: |
cat > ci/tmpinv/buildah_verbose.yml <<'EOF'
plugin: containers.podman.buildah_containers
name_patterns: ['no-such-*']
EOF
set -o pipefail
ANSIBLE_INVENTORY_ENABLED=containers.podman.buildah_containers,yaml,ini \
ansible-inventory -i ci/tmpinv/buildah_verbose.yml --list -vvvv 1>/tmp/buildah_verbose.out 2>/tmp/buildah_verbose.err || true
echo "buildah_verbose.err:"
cat /tmp/buildah_verbose.err
echo "buildah_verbose.out:"
cat /tmp/buildah_verbose.out
grep -q "Filtered out hello-buildah by name_patterns option" /tmp/buildah_verbose.out
- name: Test buildah inventory - empty selection with name_patterns
run: |
cat > ci/tmpinv/buildah_empty.yml <<'EOF'
plugin: containers.podman.buildah_containers
name_patterns: ['no-such-*']
EOF
out=$(ANSIBLE_INVENTORY_ENABLED=containers.podman.buildah_containers,yaml,ini ansible-inventory -i ci/tmpinv/buildah_empty.yml --list)
echo "$out" | jq '.'
# Expect no groups with hosts
test $(echo "$out" | jq '[ . | to_entries[] | select(.value.hosts != null and (.value.hosts | length) > 0) ] | length') -eq 0
- name: Test buildah inventory - match by name_patterns and host vars
run: |
cat > ci/tmpinv/buildah_match.yml <<'EOF'
plugin: containers.podman.buildah_containers
name_patterns: ['hello-buildah']
connection_plugin: containers.podman.buildah
EOF
out=$(ANSIBLE_INVENTORY_ENABLED=containers.podman.buildah_containers,yaml,ini ansible-inventory -i ci/tmpinv/buildah_match.yml --list)
echo "$out" | jq '.'
# Host should be present in at least one group's hosts list
echo "$out" | jq -e '. | to_entries | any(.value.hosts? and (.value.hosts | index("hello-buildah") != null))'
# Hostvars should include connection and ids
echo "$out" | jq -e '._meta.hostvars["hello-buildah"].ansible_connection == "containers.podman.buildah"'
echo "$out" | jq -e '._meta.hostvars["hello-buildah"] | has("buildah_container_id")'
echo "$out" | jq -e '._meta.hostvars["hello-buildah"] | has("buildah_container_name")'
unittests:
name: Unit tests inventory
runs-on: ${{ matrix.runner-os }}
strategy:
matrix:
runner-os:
- ubuntu-24.04
# ansible-version:
# - git+https://github.com/ansible/ansible.git@stable-2.15
runner-python-version:
- '3.11'
steps:
- name: Check out ${{ github.repository }} on disk
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.runner-python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.runner-python-version }}
- name: Set up pip cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('tests/sanity/requirements.txt') }}-${{ hashFiles('tests/unit/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install requirements for tests
run: >-
python -m pip install --user -r test-requirements.txt
- name: Build a collection tarball
run: >-
~/.local/bin/ansible-galaxy collection build --output-path
"${GITHUB_WORKSPACE}/.cache/collection-tarballs"
- name: Install the collection tarball
run: >-
~/.local/bin/ansible-galaxy collection install ${GITHUB_WORKSPACE}/.cache/collection-tarballs/*.tar.gz
- name: Run collection unit tests (with coverage)
run: >-
~/.local/bin/ansible-test units
--python "${{ matrix.runner-python-version }}" --coverage -vvv
tests/unit/plugins/inventory/
working-directory: >-
/home/runner/.ansible/collections/ansible_collections/containers/podman
- name: Generate coverage reports (xml, html)
run: |
~/.local/bin/ansible-test coverage xml
~/.local/bin/ansible-test coverage html
working-directory: >-
/home/runner/.ansible/collections/ansible_collections/containers/podman
- name: Upload coverage artifact (ansible-test outputs)
uses: actions/upload-artifact@v4
with:
name: inventory-coverage
path: |
/home/runner/.ansible/collections/ansible_collections/containers/podman/tests/output/coverage/**

59
.github/workflows/unittests.yml vendored Normal file
View File

@ -0,0 +1,59 @@
name: Unittests
on:
push:
pull_request:
schedule:
- cron: 3 0 * * * # Run daily at 0:03 UTC
jobs:
build-collection-artifact:
name: Test
runs-on: ${{ matrix.runner-os }}
strategy:
matrix:
runner-os:
- ubuntu-22.04
# ansible-version:
# - git+https://github.com/ansible/ansible.git@stable-2.15
runner-python-version:
- '3.11'
steps:
- name: Check out ${{ github.repository }} on disk
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.runner-python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.runner-python-version }}
- name: Set up pip cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('tests/sanity/requirements.txt') }}-${{ hashFiles('tests/unit/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install requirements for tests
run: >-
python -m pip install --user -r test-requirements.txt
- name: Build a collection tarball
run: >-
~/.local/bin/ansible-galaxy collection build --output-path
"${GITHUB_WORKSPACE}/.cache/collection-tarballs"
- name: Install the collection tarball
run: >-
~/.local/bin/ansible-galaxy collection install ${GITHUB_WORKSPACE}/.cache/collection-tarballs/*.tar.gz
- name: Run collection unit tests
run: >-
~/.local/bin/ansible-test units
--python "${{ matrix.runner-python-version }}" -vvv
tests/unit/plugins/modules/
working-directory: >-
/home/runner/.ansible/collections/ansible_collections/containers/podman

View File

@ -5,6 +5,580 @@ Ansible Podman modules and plugins Release Notes
.. contents:: Topics
v1.17.0
=======
Release Summary
---------------
Minor changes and system info module
Minor Changes
-------------
- Add another test for volumes
- Added checks for volume opts
New Modules
-----------
- containers.podman.podman_system_info - Get podman system information from host machine
v1.16.4
=======
Release Summary
---------------
Bugfixes
Bugfixes
--------
- Document that sdnotify can be set to healthy
- Fix CI for podman_image_info
- Fix None values in LogOpt in Quadlet
- Fix conditions in CI jobs
- Fix idempotency for any podman secret driver
- Fix idempotency for systemd keyword
- Fix setuptools
- Handle image arguments in podman_container
- Remove docker protocol when inspecting image
- Set custom tmpfs idempotency
- Use usedforsecurity for hashlib.sha256 only in python version >=3.9
- correctly quote labels and environment variables for quadlets
- doc - podman_secret - fix indentation error in example
- fix(podman_image) - correct intendation on 'loop' keyword
v1.16.3
=======
Release Summary
---------------
Bugfixes
Bugfixes
--------
- Don't pull image when state is absent or pull=never (#889)
- Fix idempotency for containers with env vars containing MAX_SIZE (#893)
- Fix list tags failure in podman_search (#875)
- Fix podman_container_copy examples (#882)
- docs(podman_container) - improve comments on network property (#878)
v1.16.2
=======
Release Summary
---------------
Bugfixes and Quadlet improvements
Bugfixes
--------
- Add missing parameters for podman container quadlet
- Add new options for podman_network
- Add option to specify kube file content in module
- Add quadlet file mode option to specify file permission
- Add secret to login module
- Don't check image availability in Quadlet
- Fix max_size idempotency issue
- Fix typo in quadlet generator
- Fix unsupported pull policy in example on podman_container.py
- fix quadlet cmd_args append mistake
- podman_login does not support check_mode
v1.16.1
=======
Release Summary
---------------
Bugfixes
Bugfixes
--------
- Fix podman image permissions issue and runlable test
- don't document quadlet_dir as required when setting state=quadlet
v1.16.0
=======
Release Summary
---------------
New features, podman copy module and bugfixes
Minor Changes
-------------
- Add arch to podman build command explicitly
- Add group_add parameter for podman quadlet
- Add support for check_mode in Quadlet
- Trigger a new image build when we detect that the Containerfile has changed.
- Update inspection info about objects in modules
Bugfixes
--------
- CI - Add images removal for tests
- CI - Fix podman CI test container images
- CI - add ignore list for Ansible sanity for 2.19
- CI - bump artifacts versions for GHactions
- CI - change k8s.gcr.io to registry.k8s.io in tests
- CI - fix Podman search of invalid image
- Disable idempotency for pod_id_file
- Fix command idempotency with quotes
- Fix health-startup-cmd
- Fix logic in Podman images
- Fix quadlet parameters when container uses rootfs
- fix for tls_verify being ignored
- fix(podman_image) - skip empty volume items
- fix(podman_save) - always changed when force
- modify error and docs
New Modules
-----------
- containers.podman.podman_container_copy - Copy file to or from a container
v1.15.4
=======
Release Summary
---------------
Bugfixes
Bugfixes
--------
- Fix missing entries in network quadlet generated file
- Fix quadlet parameters for restart policy
- Idempotency improvements
v1.15.3
=======
Release Summary
---------------
Bugfixes
Minor Changes
-------------
- CI Update python for latest Ansible to 3.11 in CI
Bugfixes
--------
- Fix idempotency for empty values
- params gpus should be exit_policy
v1.15.2
=======
Release Summary
---------------
Inline Containerfile option for podman_image
Minor Changes
-------------
- Add option for inline Containerfile in podman_image
v1.15.1
=======
Release Summary
---------------
Bugfixes for systemd generation
Bugfixes
--------
- Fix idempotency for pods in case of systemd generation
- Fix idempotency for systemd generations
v1.15.0
=======
Release Summary
---------------
Podman search module and bugfixes for Podman image
Major Changes
-------------
- Add podman search
Bugfixes
--------
- Fix issue with pushing podman image to repo name and org
New Modules
-----------
- containers.podman.podman_search - Search for remote images using podman
v1.14.0
=======
Release Summary
---------------
Idempotency redesign and a lot of new options
Major Changes
-------------
- Add mount and unmount for volumes
- Add multiple subnets for networks
- Add new options for podman_container
- Add new options to pod module
- Improve idempotency for networking in podman_container
- Redesign idempotency for Podman Pod module
Minor Changes
-------------
- Add autodiscovery for build context in podman_image
- Add docs, tests and more examples for podman_pod
- Add extra_args for podman_image push and pull
- Add idempotency for mounts and volumes in podman_container
- Add new functionality tests for podman_secret
- Add path and env options for podman_secret
- Add route, dns and ipam_driver to podman_network
- Create podman secret when skip_existing=True and it does not exist
Bugfixes
--------
- Fix idempotency for pod with 0.0.0.0
- Fix transports issues in podman_image
- fix(#747) set correct HealthCmd
v1.13.0
=======
Release Summary
---------------
Quadlet support for Podman
Major Changes
-------------
- Add quadlet support for Podman modules
Bugfixes
--------
- Fix pod info for non-existant pods
v1.12.1
=======
Release Summary
---------------
Support for Podman v5 and bugfixes
Minor Changes
-------------
- CI - Fix rootfs test in CI
- CI - add custom podman path to tasks
- CI - add parametrized executables to tests
- podman_container - Add pasta as default network mode after v5
- podman_container_exec - Return data for podman exec module
- podman_generate_systemd - Fix broken example for podman_generate_systemd (#708)
- podman_login - Update podman_login.py
- podman_play - Add support for kube yaml files with multi-documents (#724)
- podman_play - Update the logic for deleting pods/containers in podman_play
- podman_pod_info - handle return being list in Podman 5 (#713)
Bugfixes
--------
- podman_container - Add check and fixed for v5 network diff
- podman_container - Fix pasta networking idempotency for v5 (#728)
- podman_container_exec - Remove unnecessary quotes in podman_container_exec module
- podman_image_info - Fix wrong return data type in podman_image_info
- podman_play - Fix kube play annotations
- podman_pod - Fix broken info of pods in Podman v5
- podman_pod - Fix pod for Podman v5
- podman_pod - Fix podman pod v5 broken info issue
v1.12.0
=======
Release Summary
---------------
New podman_secret_info module, improvements and bugfixes
Minor Changes
-------------
- Add log_opt and annotaion options to podman_play module
- Add option to parse CreateCommand easily for diff calc
- Add support for setting underlying interface in podman_network
- Alias generate systemd options stop_timeout and time
- Fix CI rootfs for podman_container
- Fix broken conmon version in CI install
- Improve security_opt comparison between existing container
- podman_container - Add new arguments to podman status commands
- podman_container - Update env_file to accept a list of files instead of a single file
- podman_secret_info - Add secrets info module
Bugfixes
--------
- Add idempotency for podman_secret module
- Catch exceptions when no JSON output in podman_image
- Fail if systemd generation failed and it's explicitly set
- Fix example name
- Fix idempotency for podman_network
- Fix idempotency when using 0.0.0.0 in ports
- Fix multi-image support for podman_save
- Fix volume inspection by name in podman_volume
- Recreate stopped containers if recreate flag is enabled
New Modules
-----------
- containers.podman.podman_secret_info - Secrets info module
v1.11.0
=======
Minor Changes
-------------
- Update docs
v1.10.4
=======
Release Summary
---------------
Bugfixes and new modules
Minor Changes
-------------
- podman_container - Add support for health-on-failure action
- podman_image -Add target support for podman build image
- podman_play - Add build and context_dir option to podman_play
- podman_pod - Add options for resource limits to podman_pod
Bugfixes
--------
- Fix common file for Python 2.7
- podman_network - Do not force network removal by default
- podman_network - Fix network DNS enable idempotency issue
- podman_pod - Fix idempotency when running inside Podman container
New Modules
-----------
- containers.podman.podman_container_exec - Executes a command in a running container
- containers.podman.podman_runlabel - Run given label from given image
v1.10.3
=======
Release Summary
---------------
Bugfixes and new options for modules
Bugfixes
--------
- podman_container - Add diff and change detection to systemd generation
- podman_container - Add example with quotes in command to docs
- podman_container - Fix healthcheck issue where defined in image
- podman_container - Fix idempoency issue with PID of container
- podman_container - Fix idempotency for RestartPolicy when MaximumRetryCount
- podman_container - Fix idempotency for devices
- podman_container - Fixed idempotency with cpus parameter
- podman_container - Improve docs about container env_file on remote machine
- podman_container - added cpu_quota parameter to podman_container
- podman_export,podman_import - Adding volume import and export option
- podman_generate_systemd - Add a force field to podman_generate_systemd
- podman_image - Add restart-sec and other options to systemd generation
- podman_image - Fix pulling short image name
v1.10.2
=======
Release Summary
---------------
Bugfixes and docs changes
Bugfixes
--------
- Add hooks-dir parameter for containers
- Add idempotency for restart-policy for containers
- Add missing options to podman network
- Add more explanation about cmd_args command usage
- Add stdout to podman build and push actions
- Added support for "userns" parameter to "play" module
- CI - fix pip installation of the collection
- CI - fix podman play job for 4.4.x versions
- Change yes/no to true/false in the modules
- Convert str to json format before evaluating length.
- Fix CI for newest Ansible branch 2.16
- Fix idempotency for pods with uidmap and gidmap
- Fix idempotency lowercase for devices
- Fix network tests for Podman v4
- Fix podman logout tests for v4
- Fix pylint issues for CI ansible-test
- Fix undesirable splitting of IPv6 host addresses
- Improved documentation of `podman_generate_systemd` module
- Prepare CI for Podman v3 backward compatibility
- Support SHA256 tag for podman images
- Update podman_image to specify CPU arch when pulling image
- added podman_prune module
- become plugin podman_unshare become_user default
- fix for buildah improper remote target
- for pod kube recreate
- pod - Support passing multiple networks with params
- podman-login - fix FIPS md5 issue and registry requirement
- podman-pod - Fix idempotency for pods in 4.4.x versions
- podman_systemd - Ignore header when comparing systemd files content
v1.10.1
=======
Release Summary
---------------
Bugfixes and minor docs changes
Minor Changes
-------------
- Add missed docs for modules
Bugfixes
--------
- podman_systemd_generate - allow empty string for prefixes
- podman_unshare - Fix docs for podman_unshare become plugin
v1.10.0
=======
Release Summary
---------------
New modules, become plugin and bugfixes.
Major Changes
-------------
- New become plugin - podman_unshare
- Podman generate systemd module
Minor Changes
-------------
- Add --sdnotify option for container
- Add example unittest for container lib
- Add protection for systemd files deletion
- Add unittests for Ansible Podman modules
- Check for gha updates weekly using dependabot
- Fix PEP8 issue in podman_image
- Fix building image with buildah and become
- Fix docs issues in podman_image
- Warning about improperly configured remote target
- add required argument to example
- docs - added simple extra_args example
- generate_systemd - implement --wants, --after and --requires
- podman_image - add file parameter for Containerfile location
Bugfixes
--------
- Delete systemd files when container/pod is deleted
- Fix example in systemd generate module
- Fix expanduser in path for systemd generation
- Fix idempotency for labels in pods
- Fix podman load module for Podman 4
- Fix rerunning playbooks with generate_systemd --new
- Improve idempotency for devices mount of rootless podman
- Improve networks idempotency for v4
- Support passing multiple networks with params
- fix pod running status for older podman versions
- podman_container should ensure image by using os path if rootfs is used
v1.9.4
======
Release Summary
---------------
Bugfixes and minor changes
Minor Changes
-------------
- Remove distutils as deprecated
- Run CI on Ubuntu 22.04
- Use 2.13 Ansible version in CI jobs instead of 2.11
Bugfixes
--------
- connection_podman - Add missing docstring for method that executes the podman commands
- podman_container - Change IpcMode default to shareable
- podman_container - Disable memory idempotency
- podman_container - Fix typo in the documentation
- podman_image - Update `podman_image` to remove image with image id
- podman_load - Loop over image names when multiple images present in archive
- podman_login - Fix idempotency for podman_login
- podman_network - Allow specify podman_network options MTU and VLAN separately
- podman_network - Fix internal networks idempotency
- podman_play - Fix play_kube not working when yaml not installed on target
- podman_play - Pass errors as a string instead of list
- podman_pod - Change network attribute from str to list in pods
- podman_pod - Fix pod network idempotency
- podman_pod - Fix pod tests in CI
- podman_pod - Fix pods list retrieve
v1.9.3
======
Release Summary
---------------
Bugfixes and minor changes
Minor Changes
-------------
- Fix sanity issues with a new Ansible version
Bugfixes
--------
- Remove idempotency for log level
v1.9.2
======
@ -115,7 +689,7 @@ Bugfixes
- Don't add newlines to secrets
- Fix issue with podman and exposed ports
- Fix signal diff for truncated and RT signal names
- Support empty stings in prefixes
- Support empty strings in prefixes
- Update error message when pull set to false
v1.8.1

View File

@ -1,3 +1,3 @@
## The Podman Ansible Collections Project Community Code of Conduct
The Podman Ansible Collections project follows the [Containers Community Code of Conduct](https://github.com/containers/common/blob/master/CODE-OF-CONDUCT.md).
The Podman Ansible Collections project follows the [Containers Community Code of Conduct](https://github.com/containers/common/blob/main/CODE-OF-CONDUCT.md).

197
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,197 @@
# Contributing to the Podman Ansible Collection
First off, thank you for considering contributing to this collection! We welcome any help, from reporting a bug to submitting a new feature. Every contribution is valuable.
This document provides guidelines to help you get started. Please read it carefully to ensure a smooth and effective contribution process.
## Code of Conduct
All contributors are expected to follow our [Code of Conduct](CODE-OF-CONDUCT.md). Please make sure you are familiar with its contents.
## How to Contribute
You can contribute in several ways:
* **Reporting Bugs:** If you find a bug, please [open an issue](https://github.com/containers/ansible-podman-collections/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml) and provide as much detail as possible, including your Podman version, Ansible version, the playbook you are using, and the full error output.
* **Suggesting Enhancements:** If you have an idea for a new feature or an improvement to an existing one, please [open a feature request](https://github.com/containers/ansible-podman-collections/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.yml).
* **Submitting Pull Requests:** If you want to fix a bug or add a feature yourself, please follow the guidelines below.
## Development Setup
1. **Fork and Clone:** Fork the repository on GitHub and clone your fork locally.
```bash
git clone https://github.com/YOUR-USERNAME/ansible-podman-collections.git
cd ansible-podman-collections
```
2. **Set up a Virtual Environment:** It's highly recommended to work in a Python virtual environment.
```bash
python3 -m venv venv
source venv/bin/activate
```
3. **Install Dependencies:** The collection's testing dependencies are listed in `test-requirements.txt`.
```bash
pip install -r test-requirements.txt
```
## Guidelines for Pull Requests
### General Workflow
1. Create a new branch for your changes: `git checkout -b my-feature-or-fix`.
2. Make your changes. Follow the coding and testing guidelines below.
3. Commit your changes with a clear and descriptive message. See existing commit messages for style (`git log --oneline`).
4. Push your branch to your fork: `git push origin my-feature-or-fix`.
5. Open a pull request against the `main` branch of the original repository.
### Fixing a Bug
1. If an issue for the bug doesn't already exist, please create one.
2. Ideally, add an integration test case to `tests/integration/targets/` that reproduces the bug and fails before your fix.
3. Implement the code change that fixes the bug.
4. Run the tests to ensure your fix works and doesn't break anything else.
5. In your PR description, use the "Fixes #123" syntax to link it to the issue.
### Adding a New Module
We have a script to help you scaffold a new module.
1. **Define Module Variables:** Copy `contrib/my_module_template_vars.yaml` and customize it with your new module's details (name, author, options, etc.).
2. **Generate the Module:** Run the `contrib/generate_module.sh` script. This will create a new module file in the `contrib` directory.
3. **Place the Module:** Move the generated file into `plugins/modules/`.
4. **Add Logic:** Implement the core logic for your module. If you need to share code with other modules, consider adding it to `plugins/module_utils/`.
5. **Document:** Ensure the `DOCUMENTATION`, `EXAMPLES`, and `RETURN` sections are thorough and accurate. This is critical for users.
6. **Add Tests:** Create a new integration test role and a new CI workflow for your module (see below).
## Testing Strategy
This collection uses three types of tests. All tests must pass before a PR can be merged.
### 1. Sanity Tests
These tests check for code style, syntax errors, and other common issues. Sanity tests must pass in pull requests in opder to merge.
* **How to Run:**
```bash
bash contrib/ansible-lint.sh
```
* **Guidelines:**
* This will install collection in `/tmp` directory and run `ansible-test` sanity in docker.
* The maximum line length is 120 characters.
### 2. Unit Tests
Unit tests are for testing specific functions in isolation, often by mocking external dependencies. This is an area we are actively working to improve.
* **Location:** `tests/unit/plugins/modules/`
* **How to Run:**
```bash
bash contrib/ansible-unit.sh
```
* **Guidelines:**
* This will install collection in `/tmp` directory and run `ansible-test` unit tests.
### 3. Integration Tests
These are the most important tests in the collection. They run Ansible playbooks to test modules against a live Podman instance.
* **Location:** `tests/integration/targets/`
* **Structure:** Each subdirectory in `targets` is an Ansible role that tests a specific module or feature. The main logic is in `tasks/main.yml`.
* **Adding a New Integration Test:**
1. Create a new directory (role) for your module: `tests/integration/targets/my_new_module/tasks`.
2. Create a `main.yml` file inside that directory.
3. Write Ansible tasks that execute your module and verify its behavior. Use the `assert` or `fail` modules to check for expected outcomes.
```yaml
- name: Run my_new_module
my_new_module:
name: test_container
state: present
register: result
- name: Assert that the container was created
assert:
that:
- result.changed
- result.container.State.Status == "running"
```
* **Running Locally:** You can run a specific test role using `ansible-playbook`. This requires a working Podman installation.
* Create a testing playbook with your tests like:
```yaml
- hosts: all
gather_facts: false
tasks:
- include_tasks: tests/integration/targets/my_new_module/tasks/main.yml
```
Install the collection version you develop with:
```bash
ansible-galaxy collection install -vvv --force .
```
and then run the playbook it with:
```bash
ansible-playbook -vv -i localhost, my_playbook.yml
```
## Continuous Integration (CI)
We use GitHub Actions to run all our tests automatically.
### Adding a CI Job for a New Module
To ensure your new module is tested on every PR, you must add a new workflow file. We use a reusable workflow to make this easy.
1. Go to the `.github/workflows/` directory.
2. Create a new file named after your module, e.g., `podman_my_new_module.yml`.
3. Copy the content from an existing module workflow, like `podman_export.yml`, and adapt it. You only need to change a few lines:
```yaml
name: Podman my_new_module
on:
push:
paths:
- 'plugins/modules/podman_my_new_module.py'
- 'tests/integration/targets/podman_my_new_module/**'
pull_request:
paths:
- 'plugins/modules/podman_my_new_module.py'
- 'tests/integration/targets/podman_my_new_module/**'
jobs:
test:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: podman_my_new_module # The name of your test role
display_name: "Podman my_new_module" # A friendly name for the job
```
4. Commit this new workflow file along with your module and test code.
## Final Checklist for Pull Requests
Before you submit your PR, please make sure you have:
* [ ] Read this `CONTRIBUTING.md` guide.
* [ ] Added or updated tests for your changes.
* [ ] Run `ansible-test sanity` and fixed any issues.
* [ ] Ensured all CI checks are passing on your PR.
* [ ] Updated the `DOCUMENTATION` block in the module if you changed any parameters.
Thank you for your contribution!

204
README.md
View File

@ -1,113 +1,117 @@
[![GitHub Actions CI/CD build status — Collection test suite](https://github.com/containers/ansible-podman-collections/workflows/Collection%20build%20and%20tests/badge.svg?branch=master)](https://github.com/containers/ansible-podman-collections/actions?query=workflow%3A%22Collection%20build%20and%20tests)
<!-- omit in toc -->
# Ansible Collection: containers.podman
This repo hosts the `containers.podman` Ansible Collection.
[![CI/CD Status](https://img.shields.io/github/actions/workflow/status/containers/ansible-podman-collections/.github/workflows/collection-continuous-integration.yml?branch=main&style=for-the-badge&label=CI%2FCD)](https://github.com/containers/ansible-podman-collections/actions/workflows/collection-continuous-integration.yml)
[![Ansible Galaxy](https://img.shields.io/ansible/collection/d/containers/podman?style=for-the-badge&label=Ansible%20Galaxy)](https://galaxy.ansible.com/containers/podman)
[![License](https://img.shields.io/github/license/containers/ansible-podman-collections?style=for-the-badge)](COPYING)
The collection includes the Podman container plugins to help the build and management of Podman containers.
**Manage the full lifecycle of Podman containers, images, pods, networks, and volumes with Ansible.**
This collection provides a suite of powerful and flexible Ansible modules to automate the management of your [Podman](https://podman.io/) environment. Whether you are running a single container or orchestrating complex, multi-container applications, these modules give you the tools to do it idempotently and efficiently.
---
### **Table of Contents**
- [Key Features](#key-features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Getting Started: A Simple Example](#getting-started-a-simple-example)
- [Available Content](#available-content)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [License](#license)
---
## Key Features
- **Comprehensive Management:** Control every aspect of Podman, including containers, images, pods, networks, volumes, and secrets.
- **Idempotent Operations:** All modules are designed to be idempotent, ensuring predictable and consistent state for your resources.
- **Flexible and Powerful:** Exposes a wide range of Podman options, from simple container creation to advanced features like systemd integration and Quadlet file generation.
- **Connection Plugin:** Includes a `podman` connection plugin to execute Ansible tasks directly inside containers.
## Requirements
- **Ansible:** `ansible-core >= 2.12`
- **Python:** `python >= 3.9`
- **Podman:** A working installation of Podman on the target machine.
## Installation
Install the collection from Ansible Galaxy using the `ansible-galaxy` CLI:
```bash
ansible-galaxy collection install containers.podman
```
You can also include it in a `requirements.yml` file, which is useful for managing project dependencies:
```yaml
# requirements.yml
collections:
- name: containers.podman
```
Then, install it with:
```bash
ansible-galaxy collection install -r requirements.yml
```
## Getting Started: A Simple Example
Here is a quick example of how to ensure a Redis container is running using the `podman_container` module.
```yaml
---
- name: Deploy a Redis container with Podman
hosts: localhost
connection: local
tasks:
- name: Ensure the Redis container is running
containers.podman.podman_container:
name: my-redis-cache
image: docker.io/redis:alpine
state: started
ports:
- "6379:6379"
restart_policy: "always"
```
## Available Content
This collection includes:
- **Modules:**
- `podman_container`: Manage Podman containers.
- `podman_image`: Build, pull, and manage Podman images.
- `podman_pod`: Create and manage Podman pods.
- `podman_network`: Manage Podman networks.
- `podman_volume`: Manage Podman volumes.
- `podman_secret`: Manage Podman secrets.
- `podman_login`/`podman_logout`: Authenticate with container registries.
- ...and many more!
- **Connection Plugins:**
- `podman`: Execute Ansible tasks directly within a container.
- `buildah`: Execute Ansible tasks directly within a buildah container.
- **Become Plugins:**
- `podman_unshare`: Execute tasks within a `podman unshare` environment.
## Documentation
For collection versions that are parts of Ansible releases, the documentation can be found on
Ansible docs site: https://docs.ansible.com/ansible/latest/collections/containers/podman
The latest documentation for current collection version in the repository is hosted on github.io docs
site: https://containers.github.io/ansible-podman-collections.
## Installation and Usage
### Installing the Collection from Ansible Galaxy
Before using the Podman collection, you need to install the collection with the `ansible-galaxy` CLI:
`ansible-galaxy collection install containers.podman`
You can also include it in a `requirements.yml` file and install it via
`ansible-galaxy collection install -r requirements.yml` using the format:
```yaml
collections:
- name: containers.podman
```
or clone by your own:
```bash
mkdir -p ~/.ansible/collections/ansible_collections/containers
git clone https://github.com/containers/ansible-podman-collections.git ~/.ansible/collections/ansible_collections/containers/podman
```
### Playbooks
To use a module from Podman collection, please reference the full namespace, collection name,
and modules name that you want to use:
```yaml
---
- name: Using Podman collection
hosts: localhost
tasks:
- name: Run redis container
containers.podman.podman_container:
name: myredis
image: redis
command: redis-server --appendonly yes
state: present
recreate: yes
expose:
- 6379
volumes_from:
- mydata
```
Or you can add full namespace and collection name in the `collections` element:
```yaml
---
- name: Using Podman collection
hosts: localhost
collections:
- containers.podman
tasks:
- name: Build and push an image using existing credentials
podman_image:
name: nginx
path: /path/to/build/dir
push: yes
push_args:
dest: quay.io/acme
```
- **Official Ansible Docs:** For stable, released versions of the collection, see the documentation on the [official Ansible documentation site](https://docs.ansible.com/ansible/latest/collections/containers/podman/index.html).
- **Latest Development Version:** For the most up-to-date documentation based on the `main` branch of this repository, visit our [GitHub Pages site](https://containers.github.io/ansible-podman-collections/).
## Contributing
We are accepting Github pull requests and issues.
There are many ways in which you can participate in the project, for example:
We welcome contributions from the community! Whether you want to fix a bug, add a new feature, or improve our documentation, your help is valuable.
- Submit bugs and feature requests, and help us verify them
- Submit and review source code changes in Github pull requests
- Add new modules for Podman containers and images
## Testing and Development
If you want to develop new content for this collection or improve what is already
here, the easiest way to work on the collection is to clone it into one of the configured
[`COLLECTIONS_PATHS`](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#collections-paths),
and work on it there.
### Testing with `ansible-test`
We use `ansible-test` for sanity.
## More Information
TBD
## Communication
Please submit Github issues for communication any issues.
You can ask Podman related questions on `#podman` channel of Ansible Podman questions
on `#ansible-podman` channel on Freenode IRC.
Please read our **[Contributing Guide](CONTRIBUTING.md)** to learn how to get started with development, testing, and submitting pull requests.
## License
GPL-3.0-or-later
This collection is licensed under the [GNU General Public License v3.0 or later](COPYING).

View File

@ -1,4 +1,4 @@
## Security and Disclosure Information Policy for the Podman Ansible Collections Project
The Podman Ansible Collections Project follows the [Security and Disclosure Information Policy](https://github.com/containers/common/blob/master/SECURITY.md) for the Containers Projects.
The Podman Ansible Collections Project follows the [Security and Disclosure Information Policy](https://github.com/containers/common/blob/main/SECURITY.md) for the Containers Projects.

View File

@ -107,6 +107,348 @@ releases:
- Add pip installation for podman collection.
release_summary: Pip install and minor fixes.
release_date: '2020-08-06'
1.10.0:
changes:
bugfixes:
- Delete systemd files when container/pod is deleted
- Fix example in systemd generate module
- Fix expanduser in path for systemd generation
- Fix idempotency for labels in pods
- Fix podman load module for Podman 4
- Fix rerunning playbooks with generate_systemd --new
- Improve idempotency for devices mount of rootless podman
- Improve networks idempotency for v4
- Support passing multiple networks with params
- fix pod running status for older podman versions
- podman_container should ensure image by using os path if rootfs is used
major_changes:
- New become plugin - podman_unshare
- Podman generate systemd module
minor_changes:
- Add --sdnotify option for container
- Add example unittest for container lib
- Add protection for systemd files deletion
- Add unittests for Ansible Podman modules
- Check for gha updates weekly using dependabot
- Fix PEP8 issue in podman_image
- Fix building image with buildah and become
- Fix docs issues in podman_image
- Warning about improperly configured remote target
- add required argument to example
- docs - added simple extra_args example
- generate_systemd - implement --wants, --after and --requires
- podman_image - add file parameter for Containerfile location
release_summary: New modules, become plugin and bugfixes.
release_date: '2022-11-17'
1.10.1:
changes:
bugfixes:
- podman_systemd_generate - allow empty string for prefixes
- podman_unshare - Fix docs for podman_unshare become plugin
minor_changes:
- Add missed docs for modules
release_summary: Bugfixes and minor docs changes
release_date: '2022-11-22'
1.10.2:
changes:
bugfixes:
- Add hooks-dir parameter for containers
- Add idempotency for restart-policy for containers
- Add missing options to podman network
- Add more explanation about cmd_args command usage
- Add stdout to podman build and push actions
- Added support for "userns" parameter to "play" module
- CI - fix pip installation of the collection
- CI - fix podman play job for 4.4.x versions
- Change yes/no to true/false in the modules
- Convert str to json format before evaluating length.
- Fix CI for newest Ansible branch 2.16
- Fix idempotency for pods with uidmap and gidmap
- Fix idempotency lowercase for devices
- Fix network tests for Podman v4
- Fix podman logout tests for v4
- Fix pylint issues for CI ansible-test
- Fix undesirable splitting of IPv6 host addresses
- Improved documentation of `podman_generate_systemd` module
- Prepare CI for Podman v3 backward compatibility
- Support SHA256 tag for podman images
- Update podman_image to specify CPU arch when pulling image
- added podman_prune module
- become plugin podman_unshare become_user default
- fix for buildah improper remote target
- for pod kube recreate
- pod - Support passing multiple networks with params
- podman-login - fix FIPS md5 issue and registry requirement
- podman-pod - Fix idempotency for pods in 4.4.x versions
- podman_systemd - Ignore header when comparing systemd files content
release_summary: Bugfixes and docs changes
release_date: '2023-05-31'
1.10.3:
changes:
bugfixes:
- podman_container - Add diff and change detection to systemd generation
- podman_container - Add example with quotes in command to docs
- podman_container - Fix healthcheck issue where defined in image
- podman_container - Fix idempoency issue with PID of container
- podman_container - Fix idempotency for RestartPolicy when MaximumRetryCount
- podman_container - Fix idempotency for devices
- podman_container - Fixed idempotency with cpus parameter
- podman_container - Improve docs about container env_file on remote machine
- podman_container - added cpu_quota parameter to podman_container
- podman_export,podman_import - Adding volume import and export option
- podman_generate_systemd - Add a force field to podman_generate_systemd
- podman_image - Add restart-sec and other options to systemd generation
- podman_image - Fix pulling short image name
release_summary: Bugfixes and new options for modules
release_date: '2023-08-15'
1.10.4:
changes:
bugfixes:
- Fix common file for Python 2.7
- podman_network - Do not force network removal by default
- podman_network - Fix network DNS enable idempotency issue
- podman_pod - Fix idempotency when running inside Podman container
minor_changes:
- podman_container - Add support for health-on-failure action
- podman_image -Add target support for podman build image
- podman_play - Add build and context_dir option to podman_play
- podman_pod - Add options for resource limits to podman_pod
release_summary: Bugfixes and new modules
modules:
- description: Executes a command in a running container
name: podman_container_exec
namespace: ''
- description: Run given label from given image
name: podman_runlabel
namespace: ''
release_date: '2023-11-01'
1.11.0:
changes:
minor_changes:
- Update docs
release_date: '2023-11-05'
1.12.0:
changes:
bugfixes:
- Add idempotency for podman_secret module
- Catch exceptions when no JSON output in podman_image
- Fail if systemd generation failed and it's explicitly set
- Fix example name
- Fix idempotency for podman_network
- Fix idempotency when using 0.0.0.0 in ports
- Fix multi-image support for podman_save
- Fix volume inspection by name in podman_volume
- Recreate stopped containers if recreate flag is enabled
minor_changes:
- Add log_opt and annotaion options to podman_play module
- Add option to parse CreateCommand easily for diff calc
- Add support for setting underlying interface in podman_network
- Alias generate systemd options stop_timeout and time
- Fix CI rootfs for podman_container
- Fix broken conmon version in CI install
- Improve security_opt comparison between existing container
- podman_container - Add new arguments to podman status commands
- podman_container - Update env_file to accept a list of files instead of a
single file
- podman_secret_info - Add secrets info module
release_summary: New podman_secret_info module, improvements and bugfixes
modules:
- description: Secrets info module
name: podman_secret_info
namespace: ''
release_date: '2024-01-30'
1.12.1:
changes:
bugfixes:
- podman_container - Add check and fixed for v5 network diff
- podman_container - Fix pasta networking idempotency for v5 (#728)
- podman_container_exec - Remove unnecessary quotes in podman_container_exec
module
- podman_image_info - Fix wrong return data type in podman_image_info
- podman_play - Fix kube play annotations
- podman_pod - Fix broken info of pods in Podman v5
- podman_pod - Fix pod for Podman v5
- podman_pod - Fix podman pod v5 broken info issue
minor_changes:
- CI - Fix rootfs test in CI
- CI - add custom podman path to tasks
- CI - add parametrized executables to tests
- podman_container - Add pasta as default network mode after v5
- podman_container_exec - Return data for podman exec module
- podman_generate_systemd - Fix broken example for podman_generate_systemd (#708)
- podman_login - Update podman_login.py
- podman_play - Add support for kube yaml files with multi-documents (#724)
- podman_play - Update the logic for deleting pods/containers in podman_play
- podman_pod_info - handle return being list in Podman 5 (#713)
release_summary: Support for Podman v5 and bugfixes
release_date: '2024-04-08'
1.13.0:
changes:
bugfixes:
- Fix pod info for non-existant pods
major_changes:
- Add quadlet support for Podman modules
release_summary: Quadlet support for Podman
release_date: '2024-04-22'
1.14.0:
changes:
bugfixes:
- Fix idempotency for pod with 0.0.0.0
- Fix transports issues in podman_image
- fix(#747) set correct HealthCmd
major_changes:
- Add mount and unmount for volumes
- Add multiple subnets for networks
- Add new options for podman_container
- Add new options to pod module
- Improve idempotency for networking in podman_container
- Redesign idempotency for Podman Pod module
minor_changes:
- Add autodiscovery for build context in podman_image
- Add docs, tests and more examples for podman_pod
- Add extra_args for podman_image push and pull
- Add idempotency for mounts and volumes in podman_container
- Add new functionality tests for podman_secret
- Add path and env options for podman_secret
- Add route, dns and ipam_driver to podman_network
- Create podman secret when skip_existing=True and it does not exist
release_summary: Idempotency redesign and a lot of new options
release_date: '2024-05-30'
1.15.0:
changes:
bugfixes:
- Fix issue with pushing podman image to repo name and org
major_changes:
- Add podman search
release_summary: Podman search module and bugfixes for Podman image
modules:
- description: Search for remote images using podman
name: podman_search
namespace: ''
release_date: '2024-06-03'
1.15.1:
changes:
bugfixes:
- Fix idempotency for pods in case of systemd generation
- Fix idempotency for systemd generations
release_summary: Bugfixes for systemd generation
release_date: '2024-06-07'
1.15.2:
changes:
minor_changes:
- Add option for inline Containerfile in podman_image
release_summary: Inline Containerfile option for podman_image
release_date: '2024-06-11'
1.15.3:
changes:
bugfixes:
- Fix idempotency for empty values
- params gpus should be exit_policy
minor_changes:
- CI Update python for latest Ansible to 3.11 in CI
release_summary: Bugfixes
release_date: '2024-06-20'
1.15.4:
changes:
bugfixes:
- Fix missing entries in network quadlet generated file
- Fix quadlet parameters for restart policy
- Idempotency improvements
release_summary: Bugfixes
release_date: '2024-07-12'
1.16.0:
changes:
bugfixes:
- CI - Add images removal for tests
- CI - Fix podman CI test container images
- CI - add ignore list for Ansible sanity for 2.19
- CI - bump artifacts versions for GHactions
- CI - change k8s.gcr.io to registry.k8s.io in tests
- CI - fix Podman search of invalid image
- Disable idempotency for pod_id_file
- Fix command idempotency with quotes
- Fix health-startup-cmd
- Fix logic in Podman images
- Fix quadlet parameters when container uses rootfs
- fix for tls_verify being ignored
- fix(podman_image) - skip empty volume items
- fix(podman_save) - always changed when force
- modify error and docs
minor_changes:
- Add arch to podman build command explicitly
- Add group_add parameter for podman quadlet
- Add support for check_mode in Quadlet
- Trigger a new image build when we detect that the Containerfile has changed.
- Update inspection info about objects in modules
release_summary: New features, podman copy module and bugfixes
modules:
- description: Copy file to or from a container
name: podman_container_copy
namespace: ''
release_date: '2024-09-24'
1.16.1:
changes:
bugfixes:
- Fix podman image permissions issue and runlable test
- don't document quadlet_dir as required when setting state=quadlet
release_summary: Bugfixes
release_date: '2024-09-26'
1.16.2:
changes:
bugfixes:
- Add missing parameters for podman container quadlet
- Add new options for podman_network
- Add option to specify kube file content in module
- Add quadlet file mode option to specify file permission
- Add secret to login module
- Don't check image availability in Quadlet
- Fix max_size idempotency issue
- Fix typo in quadlet generator
- Fix unsupported pull policy in example on podman_container.py
- fix quadlet cmd_args append mistake
- podman_login does not support check_mode
release_summary: Bugfixes and Quadlet improvements
release_date: '2024-11-03'
1.16.3:
changes:
bugfixes:
- Don't pull image when state is absent or pull=never (#889)
- Fix idempotency for containers with env vars containing MAX_SIZE (#893)
- Fix list tags failure in podman_search (#875)
- Fix podman_container_copy examples (#882)
- docs(podman_container) - improve comments on network property (#878)
release_summary: Bugfixes
release_date: '2025-01-29'
1.16.4:
changes:
bugfixes:
- Document that sdnotify can be set to healthy
- Fix CI for podman_image_info
- Fix None values in LogOpt in Quadlet
- Fix conditions in CI jobs
- Fix idempotency for any podman secret driver
- Fix idempotency for systemd keyword
- Fix setuptools
- Handle image arguments in podman_container
- Remove docker protocol when inspecting image
- Set custom tmpfs idempotency
- Use usedforsecurity for hashlib.sha256 only in python version >=3.9
- correctly quote labels and environment variables for quadlets
- doc - podman_secret - fix indentation error in example
- fix(podman_image) - correct intendation on 'loop' keyword
release_summary: Bugfixes
release_date: '2025-06-04'
1.17.0:
changes:
minor_changes:
- Add another test for volumes
- Added checks for volume opts
release_summary: Minor changes and system info module
modules:
- description: Get podman system information from host machine
name: podman_system_info
namespace: ''
release_date: '2025-06-26'
1.2.0:
changes:
minor_changes:
@ -335,7 +677,7 @@ releases:
- Don't add newlines to secrets
- Fix issue with podman and exposed ports
- Fix signal diff for truncated and RT signal names
- Support empty stings in prefixes
- Support empty strings in prefixes
- Update error message when pull set to false
release_summary: Fixes for various modules
release_date: '2021-11-09'
@ -390,3 +732,36 @@ releases:
- Add requires option to podman_container module
release_summary: Bugfixes and new requires option for podman_container
release_date: '2022-03-21'
1.9.3:
changes:
bugfixes:
- Remove idempotency for log level
minor_changes:
- Fix sanity issues with a new Ansible version
release_summary: Bugfixes and minor changes
release_date: '2022-03-29'
1.9.4:
changes:
bugfixes:
- connection_podman - Add missing docstring for method that executes the podman
commands
- podman_container - Change IpcMode default to shareable
- podman_container - Disable memory idempotency
- podman_container - Fix typo in the documentation
- podman_image - Update `podman_image` to remove image with image id
- podman_load - Loop over image names when multiple images present in archive
- podman_login - Fix idempotency for podman_login
- podman_network - Allow specify podman_network options MTU and VLAN separately
- podman_network - Fix internal networks idempotency
- podman_play - Fix play_kube not working when yaml not installed on target
- podman_play - Pass errors as a string instead of list
- podman_pod - Change network attribute from str to list in pods
- podman_pod - Fix pod network idempotency
- podman_pod - Fix pod tests in CI
- podman_pod - Fix pods list retrieve
minor_changes:
- Remove distutils as deprecated
- Run CI on Ubuntu 22.04
- Use 2.13 Ansible version in CI jobs instead of 2.11
release_summary: Bugfixes and minor changes
release_date: '2022-07-04'

View File

@ -11,7 +11,7 @@
shell: >-
{% if ansible_venv is defined %}source {{ ansible_venv }}/bin/activate; {% endif %}
{{ repo_dir }}/ci/run_connection_test.sh
{{ repo_dir }}/ci/run_connection_test.sh podman {{ test_executable | default('podman') }}
args:
chdir: "{{ repo_dir }}"
executable: /bin/bash

View File

@ -0,0 +1,8 @@
---
- hosts: all
gather_facts: true
tasks:
- include_role:
name: podman_container_copy
vars:
ansible_python_interpreter: "{{ _ansible_python_interpreter }}"

View File

@ -0,0 +1,8 @@
---
- hosts: all
gather_facts: true
tasks:
- include_role:
name: podman_container_exec
vars:
ansible_python_interpreter: "{{ _ansible_python_interpreter }}"

View File

@ -0,0 +1,8 @@
---
- hosts: all
gather_facts: true
tasks:
- include_role:
name: podman_generate_systemd
vars:
ansible_python_interpreter: "{{ _ansible_python_interpreter }}"

View File

@ -0,0 +1,8 @@
---
- hosts: all
gather_facts: true
tasks:
- include_role:
name: podman_prune
vars:
ansible_python_interpreter: "/usr/bin/python"

View File

@ -0,0 +1,9 @@
---
- hosts: all
gather_facts: true
tasks:
- include_role:
name: podman_runlabel
vars:
runlabel_image: runlabel_test
ansible_python_interpreter: "{{ _ansible_python_interpreter }}"

View File

@ -0,0 +1,8 @@
---
- hosts: all
gather_facts: true
tasks:
- include_role:
name: podman_search
vars:
ansible_python_interpreter: "{{ _ansible_python_interpreter }}"

View File

@ -0,0 +1,9 @@
---
- hosts: all
gather_facts: true
tasks:
- include_role:
name: podman_secret_info
vars:
idem_image: idempotency_test
ansible_python_interpreter: "{{ _ansible_python_interpreter }}"

View File

@ -0,0 +1,8 @@
---
- hosts: all
gather_facts: true
tasks:
- include_role:
name: podman_system_connection
vars:
ansible_python_interpreter: "{{ _ansible_python_interpreter }}"

View File

@ -0,0 +1,8 @@
---
- hosts: all
gather_facts: true
tasks:
- include_role:
name: podman_system_connection_info
vars:
ansible_python_interpreter: "{{ _ansible_python_interpreter }}"

View File

@ -0,0 +1,8 @@
---
- hosts: all
gather_facts: true
tasks:
- include_role:
name: podman_system_info
vars:
ansible_python_interpreter: "{{ _ansible_python_interpreter }}"

View File

@ -1,4 +1,15 @@
---
- name: Install repo for ubuntu
become: true
shell: |
. /etc/os-release
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${VERSION_ID}/ /" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${VERSION_ID}/Release.key | apt-key add -
apt-get update
when:
- ansible_distribution|lower == "ubuntu"
- podman_version_ubuntu | default('unstable') == 'unstable'
- name: Install repo for ubuntu
become: true
shell: |
@ -6,4 +17,6 @@
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | apt-key add -
apt-get update
when: ansible_distribution|lower == "ubuntu"
when:
- ansible_distribution|lower == "ubuntu"
- podman_version_ubuntu | default('unstable') == 'stable'

View File

@ -36,10 +36,8 @@
- distro == 'CentOS7'
- setup_python|default(true)|bool
- name: Upgrade pip
pip:
name: pip
extra_args: --upgrade
- name: Install Python packaging
command: pip install --upgrade setuptools packaging pip
environment:
PATH: /usr/local/bin:{{ ansible_env.PATH }}
@ -62,6 +60,41 @@
- git
- vim
- dnsmasq
- slirp4netns
state: latest
- name: Discover slirp4netns version
shell: slirp4netns -v | grep version | awk {'print $3'}
register: version
when:
- ansible_distribution == 'Ubuntu'
- ansible_distribution_major_version is version('22', '>=')
- name: Install newest slirp4netns version
shell: >-
curl -o /tmp/slirp4netns --fail -L https://github.com/rootless-containers/slirp4netns/releases/download/v1.2.0/slirp4netns-$(uname -m);
chmod +x /tmp/slirp4netns;
mv /tmp/slirp4netns /usr/bin/slirp4netns
when:
- ansible_distribution == 'Ubuntu'
- ansible_distribution_major_version is version('22', '>=')
- version.stdout is version('1.1.0', '<')
- name: Discover conmon version
shell: conmon --version | grep version | awk {'print $3'}
register: conmon_version
when:
- ansible_distribution == 'Ubuntu'
- ansible_distribution_major_version is version('22', '>=')
- name: Downgrade broken conmon
shell: >-
wget https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_22.04/amd64/conmon_2.1.2~0_amd64.deb -O /tmp/conmon_2.1.2.deb;
apt install -y /tmp/conmon_2.1.2.deb
when:
- ansible_distribution == 'Ubuntu'
- ansible_distribution_major_version is version('22', '>=')
- conmon_version.stdout is version('2.1.9', '==')
- name: Remove virtualenv if need
file:

View File

@ -2,17 +2,26 @@
set -o pipefail
set -eux
# New requirement from ansible-core 2.14
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
CON_TYPE="${1:-podman}"
SUDO=${ROOT:+"sudo -E"}
PODMAN_EXE="${2:-podman}"
echo "Print current Podman version"
$PODMAN_EXE version
ANSIBLECMD=${ANSIBLECMD:-$(command -v ansible-playbook)}
echo "Testing $CON_TYPE connection ${ROOT:+'with root'}"
if [[ "$CON_TYPE" == "podman" ]]; then
${SUDO} podman ps | grep -q "${CON_TYPE}-container" || \
${SUDO} podman run -d --name "${CON_TYPE}-container" python:3-alpine sleep 1d
${SUDO} $PODMAN_EXE ps | grep -q "${CON_TYPE}-container" || \
${SUDO} $PODMAN_EXE run -d --name "${CON_TYPE}-container" python:3.10-alpine sleep 1d
elif [[ "$CON_TYPE" == "buildah" ]]; then
${SUDO} buildah from --name=buildah-container python:2
${SUDO} buildah from --name=buildah-container python:3.10-alpine
fi
pushd "tests/integration/targets/connection_${CON_TYPE}"
@ -26,6 +35,7 @@ exit_code=0
CMD="${SUDO:-} ${ANSIBLECMD:-ansible-playbook} \
-i tests/integration/targets/connection_${CON_TYPE}/test_connection.inventory \
-e connection_type=containers.podman.${CON_TYPE} \
-e ansible_podman_executable=$PODMAN_EXE \
ci/playbooks/connections/test.yml"
$CMD -vv || exit_code=$?

View File

@ -2,6 +2,11 @@
set -o pipefail
set -ex
# New requirement from ansible-core 2.14
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
[[ -z "$TEST2RUN" || ! -f "ci/playbooks/containers/${TEST2RUN}.yml" ]] && {
echo "Please specify test to run, for example TEST2RUN=podman_container";
exit 1;

View File

@ -6,6 +6,6 @@ ansible-galaxy collection build --output-path /tmp/ansible-lint-collection --for
pushd /tmp/ansible-lint-collection/
ansible-galaxy collection install -vvv --force $(ls /tmp/ansible-lint-collection/) -p /tmp/ansible-lint-installs
pushd /tmp/ansible-lint-installs/ansible_collections/containers/podman
ansible-test sanity --docker --color --truncate 0 --no-redact --no-pip-check --python 3.9 -v plugins/ tests/
ansible-test sanity --docker --color --truncate 0 --no-redact --python 3.12 -v plugins/ tests/
popd
popd

11
contrib/ansible-unit.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
mkdir -p /tmp/ansible-lint-installs
mkdir -p /tmp/ansible-lint-collection
rm -rf /tmp/ansible-lint-collection/*
ansible-galaxy collection build --output-path /tmp/ansible-lint-collection --force
pushd /tmp/ansible-lint-collection/
ansible-galaxy collection install -vvv --force $(ls /tmp/ansible-lint-collection/) -p /tmp/ansible-lint-installs
pushd /tmp/ansible-lint-installs/ansible_collections/containers/podman
ansible-test units --python 3.12 -vvv
popd
popd

View File

@ -9,6 +9,6 @@ if len(sys.argv) < 2:
version = sys.argv[1]
with open("galaxy.yml.in") as f:
y = yaml.safe_load(f)
y['version'] = version
y["version"] = version
with open("galaxy.yml", "w") as ff:
yaml.safe_dump(y, ff)

View File

@ -1,9 +1,9 @@
#!/usr/bin/bash
DOCS=${1:-$HOME/podman-docs}
HTML=${2:-/tmp/html}
DOCS_TMP=${3:-/tmp/docs}
COLL_DIR="/tmp/docs_new_path/ansible_collections/containers/podman"
DOCS_TMP="${COLL_DIR}/tmpdocs"
HTML="${DOCS_TMP}/build/html"
# Build current collection
rm -rf /tmp/docs_new_collection
@ -15,11 +15,15 @@ pushd /tmp/docs_new_path/ansible_collections/containers/podman
mkdir -p $DOCS_TMP
chmod g-w $DOCS_TMP
ANSIBLE_COLLECTIONS_PATH=../../../ antsibull-docs collection --use-current --squash-hierarchy --dest-dir $DOCS_TMP containers.podman
cd $DOCS_TMP
echo "extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx_antsibull_ext']" > conf.py
sphinx-build . $HTML
ANSIBLE_COLLECTIONS_PATH=../../../ antsibull-docs sphinx-init --use-current --dest-dir $DOCS_TMP containers.podman
pushd $DOCS_TMP
python -m venv .env
source .env/bin/activate
pip install -r requirements.txt
# sed -i "s@--use-current@--squash-hierarchy --use-current@g" build.sh
ANSIBLE_COLLECTIONS_PATH=../../../../ ./build.sh
rm -rf "$HTML/_sources" "$HTML/.buildinfo" "$HTML/.doctrees"
popd
cp -r $HTML/* $DOCS/
popd
popd

View File

@ -0,0 +1,123 @@
/* Compatability shim for jQuery and underscores.js.
*
* Copyright Sphinx contributors
* Released under the two clause BSD licence
*/
/**
* small helper function to urldecode strings
*
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
*/
jQuery.urldecode = function(x) {
if (!x) {
return x
}
return decodeURIComponent(x.replace(/\+/g, ' '));
};
/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;
/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
}
return result;
};
/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 &&
!jQuery(node.parentNode).hasClass(className) &&
!jQuery(node.parentNode).hasClass("nohighlight")) {
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.className = className;
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
var bbox = node.parentElement.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
addItems.push({
"parent": node.parentNode,
"target": rect});
}
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this, addItems);
});
}
}
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};
/*
* backward compatibility for jQuery.browser
* This will be supported until firefox bug is fixed.
*/
if (!jQuery.browser) {
jQuery.uaMatch = function(ua) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];
return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
jQuery.browser = {};
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
}

View File

@ -419,7 +419,9 @@ table.footnote td {
}
dl {
margin: 0;
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding: 0;
}

File diff suppressed because one or more lines are too long

190
docs/_static/basic.css vendored
View File

@ -1,12 +1,5 @@
/*
* basic.css
* ~~~~~~~~~
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/* -- main layout ----------------------------------------------------------- */
@ -115,22 +108,18 @@ img {
/* -- search page ----------------------------------------------------------- */
ul.search {
margin: 10px 0 0 20px;
padding: 0;
margin-top: 10px;
}
ul.search li {
padding: 5px 0 5px 20px;
background-image: url(file.png);
background-repeat: no-repeat;
background-position: 0 7px;
padding: 5px 0;
}
ul.search li a {
font-weight: bold;
}
ul.search li div.context {
ul.search li p.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
@ -222,7 +211,7 @@ table.modindextable td {
/* -- general body styles --------------------------------------------------- */
div.body {
min-width: 450px;
min-width: 360px;
max-width: 800px;
}
@ -237,14 +226,8 @@ a.headerlink {
visibility: hidden;
}
a.brackets:before,
span.brackets > a:before{
content: "[";
}
a.brackets:after,
span.brackets > a:after {
content: "]";
a:visited {
color: #551A8B;
}
h1:hover > a.headerlink,
@ -277,25 +260,25 @@ p.rubric {
font-weight: bold;
}
img.align-left, .figure.align-left, object.align-left {
img.align-left, figure.align-left, .figure.align-left, object.align-left {
clear: left;
float: left;
margin-right: 1em;
}
img.align-right, .figure.align-right, object.align-right {
img.align-right, figure.align-right, .figure.align-right, object.align-right {
clear: right;
float: right;
margin-left: 1em;
}
img.align-center, .figure.align-center, object.align-center {
img.align-center, figure.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
img.align-default, .figure.align-default {
img.align-default, figure.align-default, .figure.align-default {
display: block;
margin-left: auto;
margin-right: auto;
@ -319,7 +302,8 @@ img.align-default, .figure.align-default {
/* -- sidebars -------------------------------------------------------------- */
div.sidebar {
div.sidebar,
aside.sidebar {
margin: 0 0 0.5em 1em;
border: 1px solid #ddb;
padding: 7px;
@ -334,12 +318,16 @@ p.sidebar-title {
font-weight: bold;
}
nav.contents,
aside.topic,
div.admonition, div.topic, blockquote {
clear: left;
}
/* -- topics ---------------------------------------------------------------- */
nav.contents,
aside.topic,
div.topic {
border: 1px solid #ccc;
padding: 7px;
@ -377,12 +365,18 @@ div.body p.centered {
/* -- content of sidebars/topics/admonitions -------------------------------- */
div.sidebar > :last-child,
aside.sidebar > :last-child,
nav.contents > :last-child,
aside.topic > :last-child,
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}
div.sidebar::after,
aside.sidebar::after,
nav.contents::after,
aside.topic::after,
div.topic::after,
div.admonition::after,
blockquote::after {
@ -425,10 +419,6 @@ table.docutils td, table.docutils th {
border-bottom: 1px solid #aaa;
}
table.footnote td, table.footnote th {
border: 0 !important;
}
th {
text-align: left;
padding-right: 5px;
@ -455,20 +445,22 @@ td > :last-child {
/* -- figures --------------------------------------------------------------- */
div.figure {
div.figure, figure {
margin: 0.5em;
padding: 0.5em;
}
div.figure p.caption {
div.figure p.caption, figcaption {
padding: 0.3em;
}
div.figure p.caption span.caption-number {
div.figure p.caption span.caption-number,
figcaption span.caption-number {
font-style: italic;
}
div.figure p.caption span.caption-text {
div.figure p.caption span.caption-text,
figcaption span.caption-text {
}
/* -- field list styles ----------------------------------------------------- */
@ -503,6 +495,63 @@ table.hlist td {
vertical-align: top;
}
/* -- object description styles --------------------------------------------- */
.sig {
font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
}
.sig-name, code.descname {
background-color: transparent;
font-weight: bold;
}
.sig-name {
font-size: 1.1em;
}
code.descname {
font-size: 1.2em;
}
.sig-prename, code.descclassname {
background-color: transparent;
}
.optional {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.sig-param.n {
font-style: italic;
}
/* C++ specific styling */
.sig-inline.c-texpr,
.sig-inline.cpp-texpr {
font-family: unset;
}
.sig.c .k, .sig.c .kt,
.sig.cpp .k, .sig.cpp .kt {
color: #0033B3;
}
.sig.c .m,
.sig.cpp .m {
color: #1750EB;
}
.sig.c .s, .sig.c .sc,
.sig.cpp .s, .sig.cpp .sc {
color: #067D17;
}
/* -- other body styles ----------------------------------------------------- */
@ -553,19 +602,26 @@ ul.simple p {
margin-bottom: 0;
}
dl.footnote > dt,
dl.citation > dt {
aside.footnote > span,
div.citation > span {
float: left;
margin-right: 0.5em;
}
dl.footnote > dd,
dl.citation > dd {
aside.footnote > span:last-of-type,
div.citation > span:last-of-type {
padding-right: 0.5em;
}
aside.footnote > p {
margin-left: 2em;
}
div.citation > p {
margin-left: 4em;
}
aside.footnote > p:last-of-type,
div.citation > p:last-of-type {
margin-bottom: 0em;
}
dl.footnote > dd:after,
dl.citation > dd:after {
aside.footnote > p:last-of-type:after,
div.citation > p:last-of-type:after {
content: "";
clear: both;
}
@ -582,10 +638,6 @@ dl.field-list > dt {
padding-right: 5px;
}
dl.field-list > dt:after {
content: ":";
}
dl.field-list > dd {
padding-left: 0.5em;
margin-top: 0em;
@ -611,6 +663,16 @@ dd {
margin-left: 30px;
}
.sig dd {
margin-top: 0px;
margin-bottom: 0px;
}
.sig dl {
margin-top: 0px;
margin-bottom: 0px;
}
dl > dd:last-child,
dl > dd:last-child > :last-child {
margin-bottom: 0;
@ -629,14 +691,6 @@ dl.glossary dt {
font-size: 1.1em;
}
.optional {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.versionmodified {
font-style: italic;
}
@ -677,8 +731,9 @@ dl.glossary dt {
.classifier:before {
font-style: normal;
margin: 0.5em;
margin: 0 0.5em;
content: ":";
display: inline-block;
}
abbr, acronym {
@ -702,6 +757,7 @@ span.pre {
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
white-space: nowrap;
}
div[class*="highlight-"] {
@ -765,8 +821,12 @@ div.code-block-caption code {
table.highlighttable td.linenos,
span.linenos,
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
-webkit-user-select: text; /* Safari fallback only */
-webkit-user-select: none; /* Chrome/Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+ */
}
div.code-block-caption span.caption-number {
@ -781,16 +841,6 @@ div.literal-block-wrapper {
margin: 1em 0;
}
code.descname {
background-color: transparent;
font-weight: bold;
font-size: 1.2em;
}
code.descclassname {
background-color: transparent;
}
code.xref, a code {
background-color: transparent;
font-weight: bold;

491
docs/_static/css/ansible.css vendored Normal file
View File

@ -0,0 +1,491 @@
@import 'theme.css';
/*! minified with http://css-minify.online-domain-tools.com/ - all comments
* must have ! to preserve during minifying with that tool */
/*! Fix for read the docs theme:
* https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html
*/
/*! override table width restrictions */
@media screen and (min-width: 767px) {
/*! If we ever publish to read the docs, we need to use !important for
* these two styles as read the docs itself loads their theme in a way that
* we can't otherwise override it.
*/
.wy-table-responsive table td {
white-space: normal;
}
.wy-table-responsive {
overflow: visible;
}
}
/*!
* We use the class documentation-table for attribute tables where the first
* column is the name of an attribute and the second column is the description.
*/
/*! These tables look like this:
*
* Attribute Name Description
* -------------- -----------
* **NAME** This is a multi-line description
* str/required that can span multiple lines
* added in x.y
* With multiple paragraphs
* -------------- -----------
*
* **NAME** is given the class .value-name
* str is given the class .value-type
* / is given the class .value-separator
* required is given the class .value-required
* added in x.y is given the class .value-added-in
*/
/*! The extra .rst-content is so this will override rtd theme */
.rst-content table.documentation-table td {
vertical-align: top;
}
table.documentation-table td:first-child {
white-space: nowrap;
vertical-align: top;
}
table.documentation-table td:first-child p:first-child {
font-weight: 700;
display: inline;
}
/*! This is now redundant with above position-based styling */
/*!
table.documentation-table .value-name {
font-weight: bold;
display: inline;
}
*/
table.documentation-table .value-type {
font-size: x-small;
color: purple;
display: inline;
}
table.documentation-table .value-separator {
font-size: x-small;
display: inline;
}
table.documentation-table .value-required {
font-size: x-small;
color: red;
display: inline;
}
.value-added-in {
font-size: x-small;
font-style: italic;
color: green;
display: inline;
}
/*! Ansible-specific CSS pulled out of rtd theme for 2.9 */
.DocSiteProduct-header {
flex: 1;
-webkit-flex: 1;
padding: 10px 20px 20px;
display: flex;
display: -webkit-flex;
flex-direction: column;
-webkit-flex-direction: column;
align-items: center;
-webkit-align-items: center;
justify-content: flex-start;
-webkit-justify-content: flex-start;
margin-left: 20px;
margin-right: 20px;
text-decoration: none;
font-weight: 400;
font-family: "Open Sans", sans-serif;
}
.DocSiteProduct-header:active,
.DocSiteProduct-header:focus,
.DocSiteProduct-header:visited {
color: #fff;
}
.DocSiteProduct-header--core {
font-size: 25px;
background-color: #5bbdbf;
border: 2px solid #5bbdbf;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
color: #fff;
padding-left: 2px;
margin-left: 2px;
}
.DocSiteProduct-headerAlign {
width: 100%;
}
.DocSiteProduct-logo {
width: 60px;
height: 60px;
margin-bottom: -9px;
}
.DocSiteProduct-logoText {
margin-top: 6px;
font-size: 25px;
text-align: left;
}
.DocSiteProduct-CheckVersionPara {
margin-left: 2px;
padding-bottom: 4px;
margin-right: 2px;
margin-bottom: 10px;
}
/*! Ansible color scheme */
.wy-nav-top,
.wy-side-nav-search {
background-color: #5bbdbf;
}
.wy-menu-vertical header,
.wy-menu-vertical p.caption {
color: #5bbdbf;
}
.wy-menu-vertical a {
padding: 0;
}
.wy-menu-vertical a.reference.internal {
padding: 0.4045em 1.618em;
}
/*! Override sphinx rtd theme max-with of 800px */
.wy-nav-content {
max-width: 100%;
}
/*!
* Override sphinx_rtd_theme - keeps left-nav from overwriting
* Documentation title
**/
.wy-nav-side {
top: 45px;
}
/*!
* Ansible - changed absolute to relative to remove extraneous side scroll bar
**/
.wy-grid-for-nav {
position: relative;
}
/*! Ansible narrow the search box */
.wy-side-nav-search input[type="text"] {
width: 90%;
padding-left: 24px;
}
/*! Ansible - remove so highlight indenting is correct */
.rst-content .highlighted {
padding: 0;
}
.DocSiteBanner {
display: flex;
display: -webkit-flex;
justify-content: center;
-webkit-justify-content: center;
flex-wrap: wrap;
-webkit-flex-wrap: wrap;
margin-bottom: 25px;
}
.DocSiteBanner-imgWrapper {
max-width: 100%;
}
td,
th {
min-width: 100px;
}
table {
overflow-x: auto;
max-width: 100%;
}
.documentation-table td,
.documentation-table th {
padding: 4px;
border-left: 1px solid #000;
border-top: 1px solid #000;
}
.documentation-table {
border-right: 1px solid #000;
border-bottom: 1px solid #000;
}
@media print {
* {
background: 0 0 !important;
color: #000 !important;
text-shadow: none !important;
filter: none !important;
-ms-filter: none !important;
}
#nav,
a,
a:visited {
text-decoration: underline;
}
a[href]:after {
content: " (" attr(href) ")";
}
abbr[title]:after {
content: " (" attr(title) ")";
}
.ir a:after,
a[href^="javascript:"]:after,
a[href^="#"]:after {
content: "";
}
/*! Don't show links for images, or javascript/internal links */
pre,
blockquote {
border: 0 solid #999;
page-break-inside: avoid;
}
thead {
display: table-header-group;
}
/*! h5bp.com/t */
tr,
img {
page-break-inside: avoid;
}
img {
max-width: 100% !important;
}
@page {
margin: 0.5cm;
}
h2,
h3,
p {
orphans: 3;
widows: 3;
}
h2,
h3 {
page-break-after: avoid;
}
#google_image_div,
.DocSiteBanner {
display: none !important;
}
}
#sideBanner,
.DocSite-globalNav {
display: none;
}
.DocSite-sideNav {
display: block;
margin-bottom: 40px;
}
.DocSite-nav {
display: none;
}
.ansibleNav {
background: #000;
padding: 0 20px;
width: auto;
border-bottom: 1px solid #444;
font-size: 14px;
z-index: 1;
}
.ansibleNav ul {
list-style: none;
padding-left: 0;
margin-top: 0;
}
.ansibleNav ul li {
padding: 7px 0;
border-bottom: 1px solid #444;
}
.ansibleNav ul li:last-child {
border: none;
}
.ansibleNav ul li a {
color: #fff;
text-decoration: none;
text-transform: uppercase;
padding: 6px 0;
}
.ansibleNav ul li a:hover {
color: #5bbdbf;
background: 0 0;
}
h4 {
font-size: 105%;
}
h5 {
font-size: 90%;
}
h6 {
font-size: 80%;
}
@media screen and (min-width: 768px) {
.DocSite-globalNav {
display: block;
position: fixed;
}
#sideBanner {
display: block;
}
.DocSite-sideNav {
display: none;
}
.DocSite-nav {
flex: initial;
-webkit-flex: initial;
display: flex;
display: -webkit-flex;
flex-direction: row;
-webkit-flex-direction: row;
justify-content: flex-start;
-webkit-justify-content: flex-start;
padding: 15px;
background-color: #000;
text-decoration: none;
font-family: "Open Sans", sans-serif;
}
.DocSiteNav-logo {
width: 28px;
height: 28px;
margin-right: 8px;
margin-top: -6px;
position: fixed;
z-index: 1;
}
.DocSiteNav-title {
color: #fff;
font-size: 20px;
position: fixed;
margin-left: 40px;
margin-top: -4px;
z-index: 1;
}
.ansibleNav {
height: 45px;
width: 100%;
font-size: 13px;
padding: 0 60px 0 0;
}
.ansibleNav ul {
float: right;
display: flex;
flex-wrap: nowrap;
margin-top: 13px;
}
.ansibleNav ul li {
padding: 0;
border-bottom: none;
}
.ansibleNav ul li a {
color: #fff;
text-decoration: none;
text-transform: uppercase;
padding: 8px 13px;
}
h4 {
font-size: 105%;
}
h5 {
font-size: 90%;
}
h6 {
font-size: 80%;
}
}
@media screen and (min-width: 768px) {
#sideBanner,
.DocSite-globalNav {
display: block;
}
.DocSite-sideNav {
display: none;
}
.DocSite-nav {
flex: initial;
-webkit-flex: initial;
display: flex;
display: -webkit-flex;
flex-direction: row;
-webkit-flex-direction: row;
justify-content: flex-start;
-webkit-justify-content: flex-start;
padding: 15px;
background-color: #000;
text-decoration: none;
font-family: "Open Sans", sans-serif;
}
.DocSiteNav-logo {
width: 28px;
height: 28px;
margin-right: 8px;
margin-top: -6px;
position: fixed;
}
.DocSiteNav-title {
color: #fff;
font-size: 20px;
position: fixed;
margin-left: 40px;
margin-top: -4px;
}
.ansibleNav {
height: 45px;
font-size: 13px;
padding: 0 60px 0 0;
}
.ansibleNav ul {
float: right;
display: flex;
flex-wrap: nowrap;
margin-top: 13px;
}
.ansibleNav ul li {
padding: 0;
border-bottom: none;
}
.ansibleNav ul li a {
color: #fff;
text-decoration: none;
text-transform: uppercase;
padding: 8px 13px;
}
h4 {
font-size: 105%;
}
h5 {
font-size: 90%;
}
h6 {
font-size: 80%;
}
}
/* ansibleOptionLink is adapted from h1 .headerlink in sphinx_rtd_theme */
/* This definition lives in the antsibull Sphinx extension; we update it here to use the icon from FontAwesome */
/* https://github.com/ansible-community/antsibull-docs/blob/main/src/sphinx_antsibull_ext/css/antsibull-minimal.scss */
tr .ansibleOptionLink::after {
content: "" !important;
font-family: FontAwesome;
}
tr .ansibleOptionLink {
font: normal normal normal 14px/1 FontAwesome;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@media screen and (min-width: 767px) {
/* Move anchors a bit up so that they aren't hidden by the header bar */
section [id] {
padding-top: 45px;
margin-top: -45px;
}
/*
* Without this,
* for example most links in the page's TOC aren't usable anymore, and tables
* sometimes overlap the text above
* */
section a[id], section table[id] {
padding-top: 0;
margin-top: 0;
}
}
/* Assure reading examples does not require horizontal scrolling */
.rst-content div[class^="highlight"] pre {
white-space: pre-wrap;
}
.rst-content dl dt { margin-bottom: 0; }
/*! Make sure that environment variable links are blue */
.rst-content code.xref.std-envvar { color: #2980b9; }

1
docs/_static/css/badge_only.css vendored Normal file
View File

@ -0,0 +1 @@
.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions .rst-other-versions .rtd-current-item{font-weight:700}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}#flyout-search-form{padding:6px}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
docs/_static/css/fonts/lato-bold.woff vendored Normal file

Binary file not shown.

BIN
docs/_static/css/fonts/lato-bold.woff2 vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
docs/_static/css/fonts/lato-normal.woff vendored Normal file

Binary file not shown.

BIN
docs/_static/css/fonts/lato-normal.woff2 vendored Normal file

Binary file not shown.

4
docs/_static/css/rtd-ethical-ads.css vendored Normal file
View File

@ -0,0 +1,4 @@
.ethical-sidebar,
.ethical-footer {
border-radius: 0 !important;
}

4
docs/_static/css/theme.css vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,316 +1,149 @@
/*
* doctools.js
* ~~~~~~~~~~~
*
* Sphinx JavaScript utilities for all documentation.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
* Base JavaScript utilities for all Sphinx HTML documentation.
*/
"use strict";
/**
* select a different prefix for underscore
*/
$u = _.noConflict();
const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
"TEXTAREA",
"INPUT",
"SELECT",
"BUTTON",
]);
/**
* make the code below compatible with browsers without
* an installed firebug like debugger
if (!window.console || !console.firebug) {
var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
"dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
"profile", "profileEnd"];
window.console = {};
for (var i = 0; i < names.length; ++i)
window.console[names[i]] = function() {};
}
*/
/**
* small helper function to urldecode strings
*/
jQuery.urldecode = function(x) {
return decodeURIComponent(x).replace(/\+/g, ' ');
};
/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;
/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
const _ready = (callback) => {
if (document.readyState !== "loading") {
callback();
} else {
document.addEventListener("DOMContentLoaded", callback);
}
return result;
};
/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 &&
!jQuery(node.parentNode).hasClass(className) &&
!jQuery(node.parentNode).hasClass("nohighlight")) {
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.className = className;
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
var bbox = node.parentElement.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
addItems.push({
"parent": node.parentNode,
"target": rect});
}
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this, addItems);
});
}
}
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};
/*
* backward compatibility for jQuery.browser
* This will be supported until firefox bug is fixed.
*/
if (!jQuery.browser) {
jQuery.uaMatch = function(ua) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];
return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
jQuery.browser = {};
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
}
/**
* Small JavaScript module for the documentation.
*/
var Documentation = {
init : function() {
this.fixFirefoxAnchorBug();
this.highlightSearchWords();
this.initIndexTable();
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
this.initOnKeyListeners();
}
const Documentation = {
init: () => {
Documentation.initDomainIndexTable();
Documentation.initOnKeyListeners();
},
/**
* i18n support
*/
TRANSLATIONS : {},
PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
LOCALE : 'unknown',
TRANSLATIONS: {},
PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
LOCALE: "unknown",
// gettext and ngettext don't access this so that the functions
// can safely bound to a different name (_ = Documentation.gettext)
gettext : function(string) {
var translated = Documentation.TRANSLATIONS[string];
if (typeof translated === 'undefined')
return string;
return (typeof translated === 'string') ? translated : translated[0];
gettext: (string) => {
const translated = Documentation.TRANSLATIONS[string];
switch (typeof translated) {
case "undefined":
return string; // no translation
case "string":
return translated; // translation exists
default:
return translated[0]; // (singular, plural) translation tuple exists
}
},
ngettext : function(singular, plural, n) {
var translated = Documentation.TRANSLATIONS[singular];
if (typeof translated === 'undefined')
return (n == 1) ? singular : plural;
return translated[Documentation.PLURALEXPR(n)];
ngettext: (singular, plural, n) => {
const translated = Documentation.TRANSLATIONS[singular];
if (typeof translated !== "undefined")
return translated[Documentation.PLURAL_EXPR(n)];
return n === 1 ? singular : plural;
},
addTranslations : function(catalog) {
for (var key in catalog.messages)
this.TRANSLATIONS[key] = catalog.messages[key];
this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
this.LOCALE = catalog.locale;
addTranslations: (catalog) => {
Object.assign(Documentation.TRANSLATIONS, catalog.messages);
Documentation.PLURAL_EXPR = new Function(
"n",
`return (${catalog.plural_expr})`
);
Documentation.LOCALE = catalog.locale;
},
/**
* add context elements like header anchor links
* helper function to focus on search bar
*/
addContextElements : function() {
$('div[id] > :header:first').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', _('Permalink to this headline')).
appendTo(this);
});
$('dt[id]').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', _('Permalink to this definition')).
appendTo(this);
});
focusSearchBar: () => {
document.querySelectorAll("input[name=q]")[0]?.focus();
},
/**
* workaround a firefox stupidity
* see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
* Initialise the domain index toggle buttons
*/
fixFirefoxAnchorBug : function() {
if (document.location.hash && $.browser.mozilla)
window.setTimeout(function() {
document.location.href += '';
}, 10);
},
/**
* highlight the search words provided in the url in the text
*/
highlightSearchWords : function() {
var params = $.getQueryParameters();
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
if (terms.length) {
var body = $('div.body');
if (!body.length) {
body = $('body');
initDomainIndexTable: () => {
const toggler = (el) => {
const idNumber = el.id.substr(7);
const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
if (el.src.substr(-9) === "minus.png") {
el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
toggledRows.forEach((el) => (el.style.display = "none"));
} else {
el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
toggledRows.forEach((el) => (el.style.display = ""));
}
window.setTimeout(function() {
$.each(terms, function() {
body.highlightText(this.toLowerCase(), 'highlighted');
});
}, 10);
$('<p class="highlight-link"><a href="javascript:Documentation.' +
'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
.appendTo($('#searchbox'));
}
};
const togglerElements = document.querySelectorAll("img.toggler");
togglerElements.forEach((el) =>
el.addEventListener("click", (event) => toggler(event.currentTarget))
);
togglerElements.forEach((el) => (el.style.display = ""));
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
},
/**
* init the domain index toggle buttons
*/
initIndexTable : function() {
var togglers = $('img.toggler').click(function() {
var src = $(this).attr('src');
var idnum = $(this).attr('id').substr(7);
$('tr.cg-' + idnum).toggle();
if (src.substr(-9) === 'minus.png')
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
else
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
}).css('display', '');
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
togglers.click();
}
},
initOnKeyListeners: () => {
// only install a listener if it is really needed
if (
!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
)
return;
/**
* helper function to hide the search marks again
*/
hideSearchWords : function() {
$('#searchbox .highlight-link').fadeOut(300);
$('span.highlighted').removeClass('highlighted');
},
document.addEventListener("keydown", (event) => {
// bail for input elements
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
// bail with special keys
if (event.altKey || event.ctrlKey || event.metaKey) return;
/**
* make the url absolute
*/
makeURL : function(relativeURL) {
return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
},
if (!event.shiftKey) {
switch (event.key) {
case "ArrowLeft":
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
/**
* get the current relative url
*/
getCurrentURL : function() {
var path = document.location.pathname;
var parts = path.split(/\//);
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
if (this === '..')
parts.pop();
});
var url = parts.join('/');
return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
},
initOnKeyListeners: function() {
$(document).keydown(function(event) {
var activeElementType = document.activeElement.tagName;
// don't navigate when in search box, textarea, dropdown or button
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
&& activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey
&& !event.shiftKey) {
switch (event.keyCode) {
case 37: // left
var prevHref = $('link[rel="prev"]').prop('href');
if (prevHref) {
window.location.href = prevHref;
return false;
const prevLink = document.querySelector('link[rel="prev"]');
if (prevLink && prevLink.href) {
window.location.href = prevLink.href;
event.preventDefault();
}
case 39: // right
var nextHref = $('link[rel="next"]').prop('href');
if (nextHref) {
window.location.href = nextHref;
return false;
break;
case "ArrowRight":
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
const nextLink = document.querySelector('link[rel="next"]');
if (nextLink && nextLink.href) {
window.location.href = nextLink.href;
event.preventDefault();
}
break;
}
}
// some keyboard layouts may need Shift to get /
switch (event.key) {
case "/":
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
Documentation.focusSearchBar();
event.preventDefault();
}
});
}
},
};
// quick alias for translations
_ = Documentation.gettext;
const _ = Documentation.gettext;
$(document).ready(function() {
Documentation.init();
});
_ready(Documentation.init);

View File

@ -1,12 +1,13 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
const DOCUMENTATION_OPTIONS = {
VERSION: '',
LANGUAGE: 'None',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
FILE_SUFFIX: '.html',
LINK_SUFFIX: '.html',
HAS_SOURCE: true,
HAS_SOURCE: false,
SOURCELINK_SUFFIX: '.txt',
NAVIGATION_WITH_KEYS: false
NAVIGATION_WITH_KEYS: false,
SHOW_SEARCH_SUMMARY: true,
ENABLE_SEARCH_SHORTCUTS: true,
};

BIN
docs/_static/fonts/Lato/lato-bold.eot vendored Normal file

Binary file not shown.

BIN
docs/_static/fonts/Lato/lato-bold.ttf vendored Normal file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More