This commit introduces two new modules for managing Podman Quadlets:
- podman_quadlet: Install and remove Podman Quadlet files
* Supports installing single files, directories, and additional config files
* Implements idempotent state management (present/absent)
* Validates parameters and provides meaningful error messages
* Default force=true for removal operations
* Removed deprecated 'ignore' parameter in favor of built-in idempotency
- podman_quadlet_info: Gather information about installed Quadlets
* Lists all installed quadlets or prints specific quadlet content
* Supports filtering by quadlet kinds (container, pod, network, etc.)
* Provides detailed quadlet metadata including status and paths
Key features:
- Shared utilities in module_utils/podman/quadlet.py for code reuse
- Comprehensive integration tests for both modules
- Full idempotency support for all operations
- Proper handling of edge cases (missing files, malformed quadlets, etc.)
- Check mode support for safe dry-run operations
- Extensive documentation and examples
The modules use relative imports for module_utils to support local
development and testing with the containers.podman collection.
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
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>
* 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>
* 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>
* 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>