mirror of
https://github.com/containers/ansible-podman-collections.git
synced 2026-02-04 07:11:49 +00:00
Add podman Quadlet modules
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>
This commit is contained in:
parent
a808c18fbc
commit
09bb5454a9
9 changed files with 2091 additions and 0 deletions
34
.github/workflows/podman_quadlet.yml
vendored
Normal file
34
.github/workflows/podman_quadlet.yml
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
name: Podman quadlet
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- ".github/workflows/podman_quadlet.yml"
|
||||
- ".github/workflows/reusable-module-test.yml"
|
||||
- "ci/*.yml"
|
||||
- "ci/run_containers_tests.sh"
|
||||
- "ci/playbooks/containers/podman_quadlet.yml"
|
||||
- "plugins/modules/podman_quadlet.py"
|
||||
- "plugins/module_utils/podman/quadlet.py"
|
||||
- "tests/integration/targets/podman_quadlet/**"
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/workflows/podman_quadlet.yml"
|
||||
- ".github/workflows/reusable-module-test.yml"
|
||||
- "ci/*.yml"
|
||||
- "ci/run_containers_tests.sh"
|
||||
- "ci/playbooks/containers/podman_quadlet.yml"
|
||||
- "plugins/modules/podman_quadlet.py"
|
||||
- "plugins/module_utils/podman/quadlet.py"
|
||||
- "tests/integration/targets/podman_quadlet/**"
|
||||
schedule:
|
||||
- cron: 4 0 * * * # Run daily at 0:04 UTC
|
||||
|
||||
jobs:
|
||||
test_podman_quadlet:
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: "podman_quadlet"
|
||||
display_name: "Podman quadlet"
|
||||
Loading…
Add table
Add a link
Reference in a new issue