Compare commits

...

54 Commits
1.16.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
260 changed files with 23098 additions and 11748 deletions

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

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

@ -20,7 +20,7 @@ jobs:
- 3.9
steps:
- name: Check out ${{ github.repository }} on disk
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.runner-python-version }}
uses: actions/setup-python@v5
with:
@ -57,31 +57,23 @@ jobs:
runner-os:
- ubuntu-22.04
runner-python-version:
- '3.10'
- '3.11'
ansible-version:
- ansible<2.10
- git+https://github.com/ansible/ansible.git@stable-2.17
- git+https://github.com/ansible/ansible.git@stable-2.18
- git+https://github.com/ansible/ansible.git@devel
python-version:
- '3.10'
- '3.11'
include:
- 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'
- runner-os: ubuntu-22.04
runner-python-version: 3.8
ansible-version: ansible<2.10
python-version: 3.8
exclude:
- runner-os: ubuntu-22.04
runner-python-version: '3.10'
ansible-version: git+https://github.com/ansible/ansible.git@devel
python-version: '3.10'
- runner-os: ubuntu-22.04
runner-python-version: '3.10'
ansible-version: ansible<2.10
python-version: '3.10'
steps:
- name: Set up Python ${{ matrix.runner-python-version }}
@ -100,7 +92,7 @@ jobs:
run: >-
python -m pip install --user '${{ matrix.ansible-version }}'
- name: Download migrated collection artifacts
uses: actions/download-artifact@v4
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'
@ -34,7 +34,7 @@ jobs:
steps:
- name: Check out ${{ github.repository }} on disk
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.runner-python-version }}
uses: actions/setup-python@v5

View File

@ -19,7 +19,7 @@ jobs:
steps:
- name: Check out ${{ github.repository }} on disk
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.runner-python-version }}
uses: actions/setup-python@v5

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'
@ -38,7 +38,7 @@ jobs:
- 3.9
steps:
- name: Check out ${{ github.repository }} on disk
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.runner-python-version }}
uses: actions/setup-python@v5
with:
@ -76,7 +76,6 @@ jobs:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
- git+https://github.com/ansible/ansible.git@stable-2.17
- git+https://github.com/ansible/ansible.git@devel
os:
@ -85,7 +84,7 @@ jobs:
#- ubuntu-16.04
#- macos-latest
python-version:
- "3.10"
- "3.11"
# - 3.9
#- 3.6
#- 3.5
@ -93,16 +92,16 @@ jobs:
include:
- os: ubuntu-22.04
ansible-version: git+https://github.com/ansible/ansible.git@devel
python-version: "3.11"
python-version: "3.12"
exclude:
- os: ubuntu-22.04
ansible-version: git+https://github.com/ansible/ansible.git@devel
python-version: "3.10"
python-version: "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
@ -128,7 +127,7 @@ jobs:
run: python -m pip install --user '${{ matrix.ansible-version }}'
- name: Download migrated collection artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: collection
path: .cache/collection-tarballs
@ -174,8 +173,7 @@ jobs:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
- git+https://github.com/ansible/ansible.git@stable-2.17
- git+https://github.com/ansible/ansible.git@stable-2.18
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-22.04
@ -184,23 +182,23 @@ jobs:
#- macos-latest
python-version:
#- 3.9
- "3.10"
- "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.11"
python-version: "3.12"
exclude:
- os: ubuntu-22.04
ansible-version: git+https://github.com/ansible/ansible.git@devel
python-version: "3.10"
python-version: "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
@ -226,7 +224,7 @@ jobs:
run: python -m pip install --user '${{ matrix.ansible-version }}'
- name: Download migrated collection artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: collection
path: .cache/collection-tarballs

View File

@ -14,7 +14,7 @@ on:
- 'plugins/modules/podman_container_info.py'
- 'tests/integration/targets/podman_container/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_container.yml'
@ -42,34 +42,33 @@ jobs:
fail-fast: false
matrix:
ansible-version:
- ansible<2.10
- git+https://github.com/ansible/ansible.git@stable-2.17
- git+https://github.com/ansible/ansible.git@stable-2.18
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-22.04
python-version:
- "3.10"
- "3.11"
podman-version:
- unstable
include:
- os: ubuntu-22.04
ansible-version: git+https://github.com/ansible/ansible.git@stable-2.17
python-version: "3.10"
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.11"
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.10"
python-version: "3.11"
podman-version: unstable
steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5

View File

@ -4,16 +4,18 @@ 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:
- master
- 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'
@ -23,77 +25,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_container_copy:
name: Podman Container Copy ${{ 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:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-22.04
python-version:
- 3.11
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: Run collection tests for Podman Container Copy module
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=podman_container_copy ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_container_copy'
display_name: 'Podman Container Copy module'

View File

@ -4,16 +4,18 @@ 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:
- master
- 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'
@ -23,77 +25,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_container_exec:
name: Podman container exec ${{ 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:
# - ansible<2.10
- git+https://github.com/ansible/ansible.git@stable-2.17
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: Run collection tests for Podman container exec
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=podman_container_exec ./ci/run_containers_tests.sh
shell: bash
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,94 +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-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
# - ansible<2.10
- git+https://github.com/ansible/ansible.git@stable-2.17
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: Run preparing tests for podman container
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
shell: bash
- name: Run idempotency tests for podman container
run: |
export PATH=~/.local/bin:$PATH
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
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,85 +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-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
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-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: Run collection tests for podman container info
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=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,85 +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-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- git+https://github.com/ansible/ansible.git@stable-2.17
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: |
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
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=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,85 +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-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
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-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: Run collection tests for podman export
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=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

@ -4,16 +4,18 @@ 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:
- master
- 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'
@ -23,77 +25,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_generate_systemd:
name: Podman generate systemd ${{ 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:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: Run collection tests for Podman generate systemd
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=podman_generate_systemd ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_generate_systemd'
display_name: 'Podman generate systemd'

View File

@ -4,108 +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-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
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-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: Run collection tests for podman image
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=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,106 +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-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
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-22.04
python-version:
- "3.11"
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@v4
- 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: Run collection tests for podman image info
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=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,85 +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-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
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-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: Run collection tests for podman import
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=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,85 +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-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
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-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: Run collection tests for podman load
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=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,85 +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-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
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-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: Run collection tests for Podman login
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=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,85 +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-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
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-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: Run collection tests for podman login info
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=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,85 +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-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
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-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: Run collection tests for podman logout
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=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,6 +4,7 @@ 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'
@ -11,10 +12,11 @@ on:
- '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'
@ -25,85 +27,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_network:
name: Podman network ${{ 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:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: Run collection tests for podman network
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=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,85 +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-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
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-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: Run collection tests for podman network info
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=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

@ -11,7 +11,7 @@ on:
- 'plugins/module_utils/podman/quadlet.py'
- 'tests/integration/targets/podman_play/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_play.yml'
@ -25,86 +25,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_play:
name: Podman play ${{ 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:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: |
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
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=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

@ -14,7 +14,7 @@ on:
- 'plugins/modules/podman_pod_info.py'
- 'tests/integration/targets/podman_pod/**'
branches:
- master
- main
pull_request:
paths:
- '.github/workflows/podman_pod.yml'
@ -31,86 +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-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
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-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: |
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
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=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,86 +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-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
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-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: |
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
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=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'

View File

@ -4,16 +4,18 @@ 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:
- master
- 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'
@ -23,85 +25,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_prune:
name: Podman prune ${{ 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:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: Run collection tests for podman prune
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=podman_prune ./ci/run_containers_tests.sh
shell: bash
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_prune'
display_name: 'Podman prune'

View File

@ -4,16 +4,18 @@ 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:
- master
- 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'
@ -23,77 +25,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_runlabel:
name: Podman runlabel module ${{ 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:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: Run collection tests for Podman runlabel module
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=podman_runlabel ./ci/run_containers_tests.sh
shell: bash
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,85 +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-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
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-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: Run collection tests for podman save
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=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'

View File

@ -4,16 +4,18 @@ 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:
- master
- 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'
@ -23,85 +25,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_search:
name: Podman search ${{ 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:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: Run collection tests for podman search
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=podman_search ./ci/run_containers_tests.sh
shell: bash
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,85 +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-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ansible-version:
- git+https://github.com/ansible/ansible.git@stable-2.17
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-22.04
python-version:
- "3.11"
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_secret'
display_name: 'Podman secret'
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: |
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
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=podman_secret ./ci/run_containers_tests.sh
shell: bash

View File

@ -4,16 +4,18 @@ 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:
- master
- 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'
@ -23,85 +25,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_secret_info:
name: Podman secret info ${{ 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:
- git+https://github.com/ansible/ansible.git@stable-2.17
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: |
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 info
run: |
export PATH=~/.local/bin:$PATH
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=podman_secret_info ./ci/run_containers_tests.sh
shell: bash
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,85 +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-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
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-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: Run collection tests for podman tag
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=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,6 +4,7 @@ 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'
@ -11,10 +12,11 @@ on:
- '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'
@ -25,85 +27,8 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_volume:
name: Podman volume ${{ 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:
- ansible<2.10
# - git+https://github.com/ansible/ansible.git@stable-2.11
- git+https://github.com/ansible/ansible.git@devel
os:
- ubuntu-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: Run collection tests for podman volume info
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=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,85 +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-22.04' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
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-22.04
python-version:
- "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v4
- 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: Run collection tests for podman volume info
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=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/**

View File

@ -21,7 +21,7 @@ jobs:
steps:
- name: Check out ${{ github.repository }} on disk
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Set up Python ${{ matrix.runner-python-version }}
uses: actions/setup-python@v5

View File

@ -5,6 +5,68 @@ 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
=======

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

@ -409,6 +409,46 @@ releases:
- 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:

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

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

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

@ -1,20 +1,9 @@
/*
* _sphinx_javascript_frameworks_compat.js
* ~~~~~~~~~~
*
* Compatability shim for jQuery and underscores.js.
*
* WILL BE REMOVED IN Sphinx 6.0
* xref RemovedInSphinx60Warning
/* Compatability shim for jQuery and underscores.js.
*
* Copyright Sphinx contributors
* Released under the two clause BSD licence
*/
/**
* select a different prefix for underscore
*/
$u = _.noConflict();
/**
* small helper function to urldecode strings
*

File diff suppressed because one or more lines are too long

View File

@ -1,12 +1,5 @@
/*
* basic.css
* ~~~~~~~~~
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/* -- main layout ----------------------------------------------------------- */
@ -115,15 +108,11 @@ 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 {
@ -237,6 +226,10 @@ a.headerlink {
visibility: hidden;
}
a:visited {
color: #551A8B;
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
@ -670,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;

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,12 +1,5 @@
/*
* doctools.js
* ~~~~~~~~~~~
*
* Base JavaScript utilities for all Sphinx HTML documentation.
*
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
"use strict";

View File

@ -1,12 +1,11 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
const DOCUMENTATION_OPTIONS = {
VERSION: '',
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,
SHOW_SEARCH_SUMMARY: 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.

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

Binary file not shown.

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

BIN
docs/_static/fonts/Lato/lato-italic.woff vendored Normal file

Binary file not shown.

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

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