Compare commits
321 Commits
Author | SHA1 | Date |
---|---|---|
|
15423c0a5a | |
|
73b7bb1d3e | |
|
5265f8c91c | |
|
f333fe7fca | |
|
ee52d9de78 | |
|
c2530a63f3 | |
|
9cffa671c8 | |
|
f4b57ac265 | |
|
6ee2f3891b | |
|
fb76891c50 | |
|
6e8c88068f | |
|
4d1917ac57 | |
|
8f0bc79e6f | |
|
e37123e06f | |
|
859215bdfb | |
|
5bb0395e9e | |
|
91d991f95b | |
|
28126094cc | |
|
2de46dd4de | |
|
54c23c9876 | |
|
68af6b98fd | |
|
e12f269323 | |
|
43e9e4c5aa | |
|
f41939d8d8 | |
|
87be6de5c7 | |
|
13a568f8c6 | |
|
f2e813671a | |
|
aa20ede71e | |
|
f6bd81e820 | |
|
6ff93e7559 | |
|
4c682e170c | |
|
50c5a2549d | |
|
11cc00e6ca | |
|
ac5da409fe | |
|
8a57012970 | |
|
2c040aa346 | |
|
5ea945dffe | |
|
f1a9456147 | |
|
35a9cc1f93 | |
|
6946a0bcbd | |
|
40d320d8f6 | |
|
d901da6301 | |
|
1449f4c1b7 | |
|
95a7edb26a | |
|
47767dab21 | |
|
14ac4a8045 | |
|
010410ae31 | |
|
a45d94d503 | |
|
16b034b71f | |
|
64e4247347 | |
|
7fa610a416 | |
|
d68ca756de | |
|
1282fc576a | |
|
a77ca6ab85 | |
|
4c84135f5d | |
|
4d3009fda9 | |
|
62348545b8 | |
|
309893047d | |
|
2deadf069a | |
|
84cff745f9 | |
|
1bdf437d09 | |
|
d4977eae0a | |
|
8aa5708355 | |
|
e46c7eb1a1 | |
|
8daec72a04 | |
|
ca8267c83b | |
|
a2806b87fd | |
|
4f8ab01fbb | |
|
36c146a633 | |
|
0b773e5d61 | |
|
c11b2af89d | |
|
1f16527350 | |
|
58edc41196 | |
|
2adc93ffb1 | |
|
46d4378426 | |
|
f9d33e880b | |
|
4973c8639e | |
|
622f82a8d9 | |
|
83d0eefcb5 | |
|
4f24eced99 | |
|
25a64101f2 | |
|
ac3a7a5fde | |
|
552af3ef7f | |
|
ebc6f13c07 | |
|
5bbc06a26c | |
|
7a1d668e0e | |
|
ba88eda0fc | |
|
6c2dda7820 | |
|
92fe1464a0 | |
|
93c1532b04 | |
|
eb46429493 | |
|
202a0fb6da | |
|
a7b89ba8fc | |
|
3e303c7797 | |
|
3087fcc353 | |
|
4e65a7bc94 | |
|
d25cf57967 | |
|
9775178872 | |
|
d113847336 | |
|
24c842fdd6 | |
|
f9aa8878fd | |
|
680b9a9309 | |
|
c7a2aec93c | |
|
c3c5877279 | |
|
e88baa9c8d | |
|
e60d54f629 | |
|
fb6ebaae55 | |
|
9c40a88a71 | |
|
8a8f9023e6 | |
|
510d8ad35b | |
|
98dd70ae74 | |
|
38d95029e8 | |
|
4cb8404b7b | |
|
abb667546c | |
|
d75126d68a | |
|
f9ab05b0ae | |
|
4985d48415 | |
|
0e24de1dd3 | |
|
d5224b5323 | |
|
863ac0e38a | |
|
9142efd82a | |
|
2887be7289 | |
|
47fc4cc119 | |
|
b3dc57c1cf | |
|
e29e2cfb19 | |
|
e1e4e7516a | |
|
391e4c54ef | |
|
7ad3dc53d5 | |
|
2ae2309cb8 | |
|
2f5da14c30 | |
|
a9e92c902b | |
|
9f34e8f78a | |
|
1ffa40c705 | |
|
b987120fa0 | |
|
4c987a1c22 | |
|
35cdaa1365 | |
|
4bfbabe727 | |
|
1476ebe685 | |
|
4591a44ef8 | |
|
7df5126cb3 | |
|
cb74414e50 | |
|
75c4834273 | |
|
453be5c5fd | |
|
ace1f5896a | |
|
7dce3c9c8e | |
|
6e04b20bf4 | |
|
44b2ce69e3 | |
|
890ae35360 | |
|
f2dcda6a1d | |
|
de490b8b37 | |
|
90ac7e19ac | |
|
a4df896bae | |
|
129710a383 | |
|
aa6a1215cd | |
|
42f10519ec | |
|
5e15993783 | |
|
7d7445d29b | |
|
efbfba7c3c | |
|
7031de6a6b | |
|
da420f96d9 | |
|
81209c9a2d | |
|
2e661d1700 | |
|
a6ece472c4 | |
|
35cac483c9 | |
|
1fe9642576 | |
|
eab26e5eba | |
|
f9cbca5582 | |
|
5ee4dd1eda | |
|
45893f4a7b | |
|
e4cf9f6133 | |
|
4d233a4146 | |
|
e245e332f0 | |
|
edcb13dd8a | |
|
c3b38b54a9 | |
|
2d006399b0 | |
|
821fe265eb | |
|
ea51855a4c | |
|
b693cb6b89 | |
|
6c87654f7f | |
|
59a0dee373 | |
|
b7e8711230 | |
|
22e0c937d8 | |
|
9b31d8f01d | |
|
1a83e0948b | |
|
3c0d2cc58c | |
|
a9fc6b9764 | |
|
e463004db7 | |
|
b65a3dea60 | |
|
ed8c04fa1e | |
|
a1a667b726 | |
|
2a8aaf4522 | |
|
e025e928b2 | |
|
18a939a167 | |
|
65d9d49aa4 | |
|
d2daf7262e | |
|
e160458eb6 | |
|
e42e11c714 | |
|
ba5fa945ef | |
|
bc3670f8dc | |
|
c6ae4b97e7 | |
|
fea8b255e5 | |
|
04f455bec1 | |
|
c6a80a5573 | |
|
11f9eded6a | |
|
4812aea6b8 | |
|
faee18ecdc | |
|
e4cd2c4493 | |
|
aeec6b92d6 | |
|
cb832c9a84 | |
|
ff12ccddaf | |
|
b91ddd3db7 | |
|
7a307453a5 | |
|
cc34c2b780 | |
|
2914785411 | |
|
4e2f42eea6 | |
|
9aedda4443 | |
|
0ae6baac3d | |
|
0932809c6a | |
|
e3000939ef | |
|
9b60fc5a33 | |
|
fc47f86a18 | |
|
52911bfc22 | |
|
296faf6154 | |
|
45e1de2bfe | |
|
e5b37d9756 | |
|
181de14633 | |
|
ab64d5f953 | |
|
e8c270370d | |
|
4149dece62 | |
|
d5f7655464 | |
|
bb4b14bc5d | |
|
1a7dc953b4 | |
|
0332db2aad | |
|
dba0d78844 | |
|
7c06ddec3b | |
|
1bfa6396a5 | |
|
9d168430a4 | |
|
f618b5ccc6 | |
|
8f5842dea6 | |
|
132baa18e4 | |
|
c4bc7ccada | |
|
7d1d016fe9 | |
|
66f2706464 | |
|
877581e31f | |
|
a762dc63d0 | |
|
e39439831f | |
|
73af4896b4 | |
|
2498c52f26 | |
|
f8a70fe5b0 | |
|
4f6ed89607 | |
|
95649a6e66 | |
|
76b070ff41 | |
|
d51e253703 | |
|
ed69d3c143 | |
|
865e1cbee9 | |
|
83632441b0 | |
|
a90c040239 | |
|
5c68ee09fe | |
|
5198b726fb | |
|
4a1608e700 | |
|
a3f8901c4c | |
|
1fa3dda67b | |
|
05dc08c201 | |
|
c952149603 | |
|
9e92a6e90c | |
|
712c3230b2 | |
|
6cf118e7a9 | |
|
c9008c75b4 | |
|
dbdac4a52b | |
|
9531d15d24 | |
|
9fe0771f4e | |
|
6219c8cb34 | |
|
3e71b76b2e | |
|
3b3358c811 | |
|
bf67c7e078 | |
|
5f74d5b4fb | |
|
409369c9fc | |
|
d0e3af2b99 | |
|
853d3a8cc7 | |
|
31dbd55579 | |
|
03f19dfe25 | |
|
9c1cd62b6f | |
|
d21b6c0326 | |
|
51ce943a63 | |
|
e9d746728d | |
|
93b5acbf6e | |
|
bd0f6f9bc4 | |
|
b72a026328 | |
|
befb381194 | |
|
cecb29222e | |
|
9068baeb99 | |
|
08dd7b0ceb | |
|
e6544bdd0a | |
|
99c2851341 | |
|
ff60aed673 | |
|
3596833a7d | |
|
33580c8991 | |
|
2c88b822cf | |
|
33b28086ec | |
|
db27c68ef9 | |
|
75198ae574 | |
|
6c862b29e7 | |
|
542986cd8a | |
|
3fe1edb5b4 | |
|
6dc481ae2c | |
|
2cc1040f33 | |
|
2577f5b0f5 | |
|
1003e966ee | |
|
25b9516488 | |
|
acedce8b4b | |
|
b33a657f00 | |
|
15dae0d9ad | |
|
20a982b564 | |
|
98c516292f | |
|
848034096c | |
|
e5d6136694 | |
|
b51dc5c814 | |
|
f1d68c0fbd | |
|
fefc7e461f | |
|
91bd219067 | |
|
4afd6bbd18 |
|
@ -0,0 +1,3 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
github: [sshnaidm]
|
|
@ -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.):**
|
|
@ -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
|
|
@ -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
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
|
@ -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:
|
|
@ -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
|
|
@ -13,20 +13,20 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
runner-os:
|
||||
- ubuntu-20.04
|
||||
- ubuntu-22.04
|
||||
ansible-version:
|
||||
- git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@stable-2.15
|
||||
runner-python-version:
|
||||
- 3.8
|
||||
- 3.9
|
||||
steps:
|
||||
- name: Check out ${{ github.repository }} on disk
|
||||
uses: actions/checkout@master
|
||||
uses: actions/checkout@v5
|
||||
- name: Set up Python ${{ matrix.runner-python-version }}
|
||||
uses: actions/setup-python@v1
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.runner-python-version }}
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('tests/sanity/requirements.txt') }}-${{ hashFiles('tests/unit/requirements.txt') }}
|
||||
|
@ -41,7 +41,7 @@ jobs:
|
|||
~/.local/bin/ansible-galaxy collection build --output-path
|
||||
"${GITHUB_WORKSPACE}/.cache/collection-tarballs"
|
||||
- name: Store migrated collection artifacts
|
||||
uses: actions/upload-artifact@v1
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: collection
|
||||
path: .cache/collection-tarballs
|
||||
|
@ -55,28 +55,33 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
runner-os:
|
||||
- ubuntu-20.04
|
||||
- ubuntu-22.04
|
||||
runner-python-version:
|
||||
- 3.8
|
||||
- '3.11'
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
- git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@stable-2.18
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
python-version:
|
||||
- 3.8
|
||||
- '3.11'
|
||||
include:
|
||||
- runner-os: ubuntu-latest
|
||||
runner-python-version: 2.7
|
||||
ansible-version: ansible<2.10
|
||||
python-version: 2.7
|
||||
- runner-os: ubuntu-22.04
|
||||
runner-python-version: '3.12'
|
||||
ansible-version: git+https://github.com/ansible/ansible.git@devel
|
||||
python-version: '3.12'
|
||||
exclude:
|
||||
- runner-os: ubuntu-22.04
|
||||
runner-python-version: '3.11'
|
||||
ansible-version: git+https://github.com/ansible/ansible.git@devel
|
||||
python-version: '3.11'
|
||||
|
||||
|
||||
steps:
|
||||
- name: Set up Python ${{ matrix.runner-python-version }}
|
||||
uses: actions/setup-python@v1
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.runner-python-version }}
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-sanity-containers
|
||||
|
@ -87,7 +92,7 @@ jobs:
|
|||
run: >-
|
||||
python -m pip install --user '${{ matrix.ansible-version }}'
|
||||
- name: Download migrated collection artifacts
|
||||
uses: actions/download-artifact@v1
|
||||
uses: actions/download-artifact@v5
|
||||
with:
|
||||
name: collection
|
||||
path: .cache/collection-tarballs
|
||||
|
|
|
@ -8,7 +8,7 @@ on:
|
|||
- 'contrib/publish-requirements.txt'
|
||||
- 'contrib/publish.sh'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/collection-publish.yml'
|
||||
|
@ -26,18 +26,18 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
runner-os:
|
||||
- ubuntu-20.04
|
||||
- ubuntu-22.04
|
||||
ansible-version:
|
||||
- git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@stable-2.15
|
||||
runner-python-version:
|
||||
- 3.9
|
||||
steps:
|
||||
|
||||
- name: Check out ${{ github.repository }} on disk
|
||||
uses: actions/checkout@master
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Python ${{ matrix.runner-python-version }}
|
||||
uses: actions/setup-python@v1
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.runner-python-version }}
|
||||
|
||||
|
|
|
@ -11,18 +11,18 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
runner-os:
|
||||
- ubuntu-20.04
|
||||
- ubuntu-22.04
|
||||
ansible-version:
|
||||
- git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@stable-2.15
|
||||
runner-python-version:
|
||||
- 3.9
|
||||
steps:
|
||||
|
||||
- name: Check out ${{ github.repository }} on disk
|
||||
uses: actions/checkout@master
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Python ${{ matrix.runner-python-version }}
|
||||
uses: actions/setup-python@v1
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.runner-python-version }}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ on:
|
|||
- 'tests/integration/targets/connection/**'
|
||||
- 'tests/integration/targets/connection_*/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/connections_tests.yml'
|
||||
|
@ -31,20 +31,20 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
runner-os:
|
||||
- ubuntu-20.04
|
||||
- ubuntu-22.04
|
||||
ansible-version:
|
||||
- git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@stable-2.15
|
||||
runner-python-version:
|
||||
- 3.8
|
||||
- 3.9
|
||||
steps:
|
||||
- name: Check out ${{ github.repository }} on disk
|
||||
uses: actions/checkout@master
|
||||
uses: actions/checkout@v5
|
||||
- name: Set up Python ${{ matrix.runner-python-version }}
|
||||
uses: actions/setup-python@v1
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.runner-python-version }}
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('tests/sanity/requirements.txt') }}-${{ hashFiles('tests/unit/requirements.txt') }}
|
||||
|
@ -59,16 +59,16 @@ jobs:
|
|||
~/.local/bin/ansible-galaxy collection build --output-path
|
||||
"${GITHUB_WORKSPACE}/.cache/collection-tarballs"
|
||||
- name: Store migrated collection artifacts
|
||||
uses: actions/upload-artifact@v1
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: collection
|
||||
path: .cache/collection-tarballs
|
||||
|
||||
test-podman-connection:
|
||||
name: Podman connection VM ${{ matrix.os || 'ubuntu-20.04' }}-${{ matrix.ansible-version }}
|
||||
name: Podman connection VM ${{ matrix.os || 'ubuntu-22.04' }}-${{ matrix.ansible-version }}
|
||||
needs:
|
||||
- build-collection-artifact-connection-tests
|
||||
runs-on: ${{ matrix.os || 'ubuntu-20.04' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
@ -76,28 +76,35 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
- git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@stable-2.17
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
#- ubuntu-20.04
|
||||
- ubuntu-22.04
|
||||
#- ubuntu-22.04
|
||||
#- ubuntu-16.04
|
||||
#- macos-latest
|
||||
python-version:
|
||||
- 3.8
|
||||
#- 3.9
|
||||
- "3.11"
|
||||
# - 3.9
|
||||
#- 3.6
|
||||
#- 3.5
|
||||
#- 2.7
|
||||
include:
|
||||
- os: ubuntu-22.04
|
||||
ansible-version: git+https://github.com/ansible/ansible.git@devel
|
||||
python-version: "3.12"
|
||||
exclude:
|
||||
- os: ubuntu-22.04
|
||||
ansible-version: git+https://github.com/ansible/ansible.git@devel
|
||||
python-version: "3.11"
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
|
@ -108,7 +115,7 @@ jobs:
|
|||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
|
@ -120,7 +127,7 @@ jobs:
|
|||
run: python -m pip install --user '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Download migrated collection artifacts
|
||||
uses: actions/download-artifact@v1
|
||||
uses: actions/download-artifact@v5
|
||||
with:
|
||||
name: collection
|
||||
path: .cache/collection-tarballs
|
||||
|
@ -133,9 +140,8 @@ jobs:
|
|||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
if [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
|
@ -156,10 +162,10 @@ jobs:
|
|||
shell: bash
|
||||
|
||||
test-buildah-connection:
|
||||
name: Buildah connection VM ${{ matrix.os || 'ubuntu-20.04' }}-${{ matrix.ansible-version }}
|
||||
name: Buildah connection VM ${{ matrix.os || 'ubuntu-22.04' }}-${{ matrix.ansible-version }}
|
||||
needs:
|
||||
- build-collection-artifact-connection-tests
|
||||
runs-on: ${{ matrix.os || 'ubuntu-20.04' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
@ -167,28 +173,35 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
- git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@stable-2.18
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
#- ubuntu-20.04
|
||||
- ubuntu-22.04
|
||||
#- ubuntu-22.04
|
||||
#- ubuntu-16.04
|
||||
#- macos-latest
|
||||
python-version:
|
||||
- 3.8
|
||||
#- 3.9
|
||||
- "3.11"
|
||||
#- 3.6
|
||||
#- 3.5
|
||||
#- 2.7
|
||||
include:
|
||||
- os: ubuntu-22.04
|
||||
ansible-version: git+https://github.com/ansible/ansible.git@devel
|
||||
python-version: "3.12"
|
||||
exclude:
|
||||
- os: ubuntu-22.04
|
||||
ansible-version: git+https://github.com/ansible/ansible.git@devel
|
||||
python-version: "3.11"
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
|
@ -199,7 +212,7 @@ jobs:
|
|||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
|
@ -211,7 +224,7 @@ jobs:
|
|||
run: python -m pip install --user '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Download migrated collection artifacts
|
||||
uses: actions/download-artifact@v1
|
||||
uses: actions/download-artifact@v5
|
||||
with:
|
||||
name: collection
|
||||
path: .cache/collection-tarballs
|
||||
|
@ -224,9 +237,8 @@ jobs:
|
|||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
if [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
|
|
|
@ -10,10 +10,11 @@ on:
|
|||
- 'plugins/modules/podman_container.py'
|
||||
- 'plugins/module_utils/podman/podman_container_lib.py'
|
||||
- 'plugins/module_utils/podman/common.py'
|
||||
- 'plugins/module_utils/podman/quadlet.py'
|
||||
- 'plugins/modules/podman_container_info.py'
|
||||
- 'tests/integration/targets/podman_container/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_container.yml'
|
||||
|
@ -23,6 +24,7 @@ on:
|
|||
- 'plugins/modules/podman_container.py'
|
||||
- 'plugins/module_utils/podman/podman_container_lib.py'
|
||||
- 'plugins/module_utils/podman/common.py'
|
||||
- 'plugins/module_utils/podman/quadlet.py'
|
||||
- 'plugins/modules/podman_container_info.py'
|
||||
- 'tests/integration/targets/podman_container/**'
|
||||
schedule:
|
||||
|
@ -31,8 +33,8 @@ on:
|
|||
jobs:
|
||||
|
||||
test_podman_container:
|
||||
name: Podman container ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
name: Podman container ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}-${{ matrix.podman-version || 'unstable' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
@ -40,22 +42,36 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
- git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@stable-2.12
|
||||
- git+https://github.com/ansible/ansible.git@stable-2.18
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
- ubuntu-22.04
|
||||
python-version:
|
||||
- 3.9
|
||||
- "3.11"
|
||||
podman-version:
|
||||
- unstable
|
||||
include:
|
||||
- os: ubuntu-22.04
|
||||
ansible-version: git+https://github.com/ansible/ansible.git@stable-2.18
|
||||
python-version: "3.11"
|
||||
podman-version: stable
|
||||
- os: ubuntu-22.04
|
||||
ansible-version: git+https://github.com/ansible/ansible.git@devel
|
||||
python-version: "3.12"
|
||||
podman-version: unstable
|
||||
exclude:
|
||||
- os: ubuntu-22.04
|
||||
ansible-version: git+https://github.com/ansible/ansible.git@devel
|
||||
python-version: "3.11"
|
||||
podman-version: unstable
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
|
@ -68,7 +84,7 @@ jobs:
|
|||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
|
@ -94,9 +110,8 @@ jobs:
|
|||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
if [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
|
@ -110,90 +125,8 @@ jobs:
|
|||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_container ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
|
||||
test_podman_container_with_pip:
|
||||
name: Podman container w/ pip ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
#- git+https://github.com/ansible/ansible.git@stable-2.10
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
python3 -m pip install --user --force-reinstall --upgrade .
|
||||
|
||||
|
||||
- name: Run collection tests for podman container
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
export ANSIBLE_COLLECTIONS_PATHS=~/.local/share/ansible/collections
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
-e setup_python=false \
|
||||
-e podman_version_ubuntu=${{ matrix.podman-version }}
|
||||
|
||||
TEST2RUN=podman_container ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
name: Podman Container Copy module
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_container_copy.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_container_copy.yml'
|
||||
- 'plugins/modules/podman_container_copy.py'
|
||||
- 'tests/integration/targets/podman_container_copy/**'
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_container_copy.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_container_copy.yml'
|
||||
- 'plugins/modules/podman_container_copy.py'
|
||||
- 'tests/integration/targets/podman_container_copy/**'
|
||||
schedule:
|
||||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
test_podman_container_copy:
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_container_copy'
|
||||
display_name: 'Podman Container Copy module'
|
|
@ -0,0 +1,32 @@
|
|||
name: Podman container exec
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_container_exec.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_container_exec.yml'
|
||||
- 'plugins/modules/podman_container_exec.py'
|
||||
- 'tests/integration/targets/podman_container_exec/**'
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_container_exec.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_container_exec.yml'
|
||||
- 'plugins/modules/podman_container_exec.py'
|
||||
- 'tests/integration/targets/podman_container_exec/**'
|
||||
schedule:
|
||||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
test_podman_container_exec:
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_container_exec'
|
||||
display_name: 'Podman container exec'
|
|
@ -12,7 +12,7 @@ on:
|
|||
- 'plugins/module_utils/podman/common.py'
|
||||
- 'tests/integration/targets/podman_container_idempotency/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_container_idem.yml'
|
||||
|
@ -27,96 +27,8 @@ on:
|
|||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
|
||||
test_podman_container_idem:
|
||||
name: Podman container ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
# - git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: |
|
||||
python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
rm -rf /tmp/just_new_collection
|
||||
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
|
||||
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
|
||||
|
||||
- name: Run preparing tests for podman container
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
shell: bash
|
||||
|
||||
- name: Run idempotency tests for podman container
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
TEST2RUN=podman_container_idempotency ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_container_idempotency'
|
||||
display_name: 'Idempotency'
|
||||
|
|
|
@ -4,6 +4,7 @@ on:
|
|||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_container_info.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_container_info.yml'
|
||||
|
@ -13,10 +14,11 @@ on:
|
|||
- 'plugins/modules/podman_container_info.py'
|
||||
- 'tests/integration/targets/podman_container_info/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_container_info.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_container_info.yml'
|
||||
|
@ -29,86 +31,8 @@ on:
|
|||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
|
||||
test_podman_container_info:
|
||||
name: Podman container info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
# - git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-latest
|
||||
python-version:
|
||||
- 3.9
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
rm -rf /tmp/just_new_collection
|
||||
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
|
||||
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
|
||||
|
||||
- name: Run collection tests for podman container info
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_container_info ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_container_info'
|
||||
display_name: 'Podman container info'
|
||||
|
|
|
@ -4,6 +4,7 @@ on:
|
|||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_containers.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_containers.yml'
|
||||
|
@ -13,13 +14,14 @@ on:
|
|||
- 'plugins/modules/podman_containers.py'
|
||||
- 'tests/integration/targets/podman_containers/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_containers.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_container.yml'
|
||||
- 'ci/playbooks/containers/podman_containers.yml'
|
||||
- 'plugins/modules/podman_container.py'
|
||||
- 'plugins/module_utils/podman/podman_container_lib.py'
|
||||
- 'plugins/module_utils/podman/common.py'
|
||||
|
@ -29,88 +31,8 @@ on:
|
|||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
|
||||
test_podman_containers:
|
||||
name: Podman multi containers ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
- git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@stable-2.12
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
rm -rf /tmp/just_new_collection
|
||||
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
|
||||
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
|
||||
|
||||
- name: Run collection tests for podman containers
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_containers ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_containers'
|
||||
display_name: 'Podman multi-containers'
|
||||
|
|
|
@ -4,16 +4,18 @@ on:
|
|||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_export.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_export.yml'
|
||||
- 'plugins/modules/podman_export.py'
|
||||
- 'tests/integration/targets/podman_export/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_export.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_export.yml'
|
||||
|
@ -23,86 +25,8 @@ on:
|
|||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
|
||||
test_podman_export:
|
||||
name: Podman export ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
# - git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
rm -rf /tmp/just_new_collection
|
||||
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
|
||||
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
|
||||
|
||||
- name: Run collection tests for podman export
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_export ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_export'
|
||||
display_name: 'Podman export'
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
name: Podman generate systemd
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_generate_systemd.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_generate_systemd.yml'
|
||||
- 'plugins/modules/podman_generate_systemd.py'
|
||||
- 'tests/integration/targets/podman_generate_systemd/**'
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_generate_systemd.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_generate_systemd.yml'
|
||||
- 'plugins/modules/podman_generate_systemd.py'
|
||||
- 'tests/integration/targets/podman_generate_systemd/**'
|
||||
schedule:
|
||||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
test_podman_generate_systemd:
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_generate_systemd'
|
||||
display_name: 'Podman generate systemd'
|
|
@ -4,107 +4,36 @@ on:
|
|||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_image.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_image.yml'
|
||||
- 'plugins/modules/podman_image.py'
|
||||
- 'plugins/modules/podman_image_info.py'
|
||||
- 'plugins/module_utils/podman/quadlet.py'
|
||||
- 'plugins/module_utils/podman/podman_image_lib.py'
|
||||
- 'tests/integration/targets/podman_image/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_image.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_image.yml'
|
||||
- 'plugins/modules/podman_image.py'
|
||||
- 'plugins/modules/podman_image_info.py'
|
||||
- 'plugins/module_utils/podman/quadlet.py'
|
||||
- 'plugins/module_utils/podman/podman_image_lib.py'
|
||||
- 'tests/integration/targets/podman_image/**'
|
||||
schedule:
|
||||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
|
||||
test_podman_image:
|
||||
name: Podman image ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
# - git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
rm -rf /tmp/just_new_collection
|
||||
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
|
||||
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
|
||||
|
||||
- name: Run collection tests for podman image
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_image ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_image'
|
||||
display_name: 'Podman image'
|
||||
extra_collections: 'ansible.posix'
|
||||
|
|
|
@ -4,107 +4,34 @@ on:
|
|||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_image_info.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_image_info.yml'
|
||||
- 'plugins/modules/podman_image.py'
|
||||
- 'plugins/modules/podman_image_info.py'
|
||||
- 'plugins/module_utils/podman/podman_image_lib.py'
|
||||
- 'tests/integration/targets/podman_image_info/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_image_info.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_image_info.yml'
|
||||
- 'plugins/modules/podman_image.py'
|
||||
- 'plugins/modules/podman_image_info.py'
|
||||
- 'plugins/module_utils/podman/podman_image_lib.py'
|
||||
- 'tests/integration/targets/podman_image_info/**'
|
||||
schedule:
|
||||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
|
||||
test_podman_image_info:
|
||||
name: Podman image info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
# - git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_image_info'
|
||||
display_name: 'Podman image info'
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
rm -rf /tmp/just_new_collection
|
||||
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
|
||||
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
|
||||
|
||||
- name: Run collection tests for podman image info
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_image_info ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
|
|
|
@ -4,16 +4,18 @@ on:
|
|||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_import.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_import.yml'
|
||||
- 'plugins/modules/podman_import.py'
|
||||
- 'tests/integration/targets/podman_import/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_import.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_import.yml'
|
||||
|
@ -23,86 +25,8 @@ on:
|
|||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
|
||||
test_podman_import:
|
||||
name: Podman import ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
# - git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
rm -rf /tmp/just_new_collection
|
||||
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
|
||||
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
|
||||
|
||||
- name: Run collection tests for podman import
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_import ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_import'
|
||||
display_name: 'Podman import'
|
||||
|
|
|
@ -4,16 +4,18 @@ on:
|
|||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_load.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_load.yml'
|
||||
- 'plugins/modules/podman_load.py'
|
||||
- 'tests/integration/targets/podman_load/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_load.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_load.yml'
|
||||
|
@ -23,86 +25,8 @@ on:
|
|||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
|
||||
test_podman_load:
|
||||
name: Podman load ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
# - git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
rm -rf /tmp/just_new_collection
|
||||
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
|
||||
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
|
||||
|
||||
- name: Run collection tests for podman load
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_load ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_load'
|
||||
display_name: 'Podman load'
|
||||
|
|
|
@ -4,16 +4,18 @@ on:
|
|||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_login.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_login.yml'
|
||||
- 'plugins/modules/podman_login.py'
|
||||
- 'tests/integration/targets/podman_login/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_login.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_login.yml'
|
||||
|
@ -23,86 +25,8 @@ on:
|
|||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
|
||||
test_podman_login:
|
||||
name: Podman login ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
# - git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
rm -rf /tmp/just_new_collection
|
||||
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
|
||||
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
|
||||
|
||||
- name: Run collection tests for Podman login
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_login ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_login'
|
||||
display_name: 'Podman login'
|
||||
|
|
|
@ -4,16 +4,18 @@ on:
|
|||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_login_info.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_login_info.yml'
|
||||
- 'plugins/modules/podman_login_info.py'
|
||||
- 'tests/integration/targets/podman_login_info/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_login_info.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_login_info.yml'
|
||||
|
@ -23,86 +25,8 @@ on:
|
|||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
|
||||
test_podman_login_info:
|
||||
name: Podman login info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
# - git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
rm -rf /tmp/just_new_collection
|
||||
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
|
||||
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
|
||||
|
||||
- name: Run collection tests for podman login info
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_login_info ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_login_info'
|
||||
display_name: 'Podman login info'
|
||||
|
|
|
@ -4,16 +4,18 @@ on:
|
|||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_logout.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_logout.yml'
|
||||
- 'plugins/modules/podman_logout.py'
|
||||
- 'tests/integration/targets/podman_logout/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_logout.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_logout.yml'
|
||||
|
@ -23,86 +25,8 @@ on:
|
|||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
|
||||
test_podman_logout:
|
||||
name: Podman logout ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
# - git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
rm -rf /tmp/just_new_collection
|
||||
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
|
||||
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
|
||||
|
||||
- name: Run collection tests for podman logout
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_logout ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_logout'
|
||||
display_name: 'Podman logout'
|
||||
|
|
|
@ -4,105 +4,31 @@ on:
|
|||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_network.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_network.yml'
|
||||
- 'plugins/modules/podman_network.py'
|
||||
- 'plugins/module_utils/podman/quadlet.py'
|
||||
- 'tests/integration/targets/podman_network/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_network.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_network.yml'
|
||||
- 'plugins/modules/podman_network.py'
|
||||
- 'plugins/module_utils/podman/quadlet.py'
|
||||
- 'tests/integration/targets/podman_network/**'
|
||||
schedule:
|
||||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
|
||||
test_podman_network:
|
||||
name: Podman network ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
# - git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
rm -rf /tmp/just_new_collection
|
||||
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
|
||||
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
|
||||
|
||||
- name: Run collection tests for podman network
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_network ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_network'
|
||||
display_name: 'Podman network'
|
||||
|
|
|
@ -4,16 +4,18 @@ on:
|
|||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_network_info.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_network_info.yml'
|
||||
- 'plugins/modules/podman_network_info.py'
|
||||
- 'tests/integration/targets/podman_network_info/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_network_info.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_network_info.yml'
|
||||
|
@ -23,86 +25,8 @@ on:
|
|||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
|
||||
test_podman_network_info:
|
||||
name: Podman network info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
# - git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
rm -rf /tmp/just_new_collection
|
||||
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
|
||||
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
|
||||
|
||||
- name: Run collection tests for podman network info
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_network_info ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_network_info'
|
||||
display_name: 'Podman network info'
|
||||
|
|
|
@ -8,9 +8,10 @@ on:
|
|||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_play.yml'
|
||||
- 'plugins/modules/podman_play.py'
|
||||
- 'plugins/module_utils/podman/quadlet.py'
|
||||
- 'tests/integration/targets/podman_play/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_play.yml'
|
||||
|
@ -18,92 +19,14 @@ on:
|
|||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_play.yml'
|
||||
- 'plugins/modules/podman_play.py'
|
||||
- 'plugins/module_utils/podman/quadlet.py'
|
||||
- 'tests/integration/targets/podman_play/**'
|
||||
schedule:
|
||||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
|
||||
test_podman_play:
|
||||
name: Podman play ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
# - git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
rm -rf /tmp/just_new_collection
|
||||
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
|
||||
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
|
||||
|
||||
- name: Run collection tests for podman play
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_play ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_play'
|
||||
display_name: 'Podman play'
|
||||
|
|
|
@ -8,11 +8,13 @@ on:
|
|||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_pod.yml'
|
||||
- 'plugins/module_utils/podman/podman_pod_lib.py'
|
||||
- 'plugins/module_utils/podman/common.py'
|
||||
- 'plugins/module_utils/podman/quadlet.py'
|
||||
- 'plugins/modules/podman_pod.py'
|
||||
- 'plugins/modules/podman_pod_info.py'
|
||||
- 'tests/integration/targets/podman_pod/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_pod.yml'
|
||||
|
@ -20,6 +22,8 @@ on:
|
|||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_pod.yml'
|
||||
- 'plugins/module_utils/podman/podman_pod_lib.py'
|
||||
- 'plugins/module_utils/podman/common.py'
|
||||
- 'plugins/module_utils/podman/quadlet.py'
|
||||
- 'plugins/modules/podman_pod.py'
|
||||
- 'plugins/modules/podman_pod_info.py'
|
||||
- 'tests/integration/targets/podman_pod/**'
|
||||
|
@ -27,87 +31,8 @@ on:
|
|||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
|
||||
test_podman_pod:
|
||||
name: Podman pod ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
# - git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
rm -rf /tmp/just_new_collection
|
||||
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
|
||||
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
|
||||
|
||||
- name: Run collection tests for podman pod
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_pod ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_pod'
|
||||
display_name: 'Podman pod'
|
||||
|
|
|
@ -12,7 +12,7 @@ on:
|
|||
- 'plugins/modules/podman_pod_info.py'
|
||||
- 'tests/integration/targets/podman_pod_info/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_pod_info.yml'
|
||||
|
@ -27,87 +27,8 @@ on:
|
|||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
|
||||
test_podman_pod_info:
|
||||
name: Podman pod info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
# - git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
rm -rf /tmp/just_new_collection
|
||||
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
|
||||
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
|
||||
|
||||
- name: Run collection tests for podman pod info
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_pod_info ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_pod_info'
|
||||
display_name: 'Podman pod info'
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
name: Podman prune
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_prune.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_prune.yml'
|
||||
- 'plugins/modules/podman_prune.py'
|
||||
- 'tests/integration/targets/podman_prune/**'
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_prune.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_prune.yml'
|
||||
- 'plugins/modules/podman_prune.py'
|
||||
- 'tests/integration/targets/podman_prune/**'
|
||||
schedule:
|
||||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
test_podman_prune:
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_prune'
|
||||
display_name: 'Podman prune'
|
|
@ -0,0 +1,32 @@
|
|||
name: Podman runlabel module
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_runlabel.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_runlabel.yml'
|
||||
- 'plugins/modules/podman_runlabel.py'
|
||||
- 'tests/integration/targets/podman_runlabel/**'
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_runlabel.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_runlabel.yml'
|
||||
- 'plugins/modules/podman_runlabel.py'
|
||||
- 'tests/integration/targets/podman_runlabel/**'
|
||||
schedule:
|
||||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
test_podman_runlabel:
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_runlabel'
|
||||
display_name: 'Podman runlabel module'
|
|
@ -4,16 +4,18 @@ on:
|
|||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_save.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_save.yml'
|
||||
- 'plugins/modules/podman_save.py'
|
||||
- 'tests/integration/targets/podman_save/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_save.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_save.yml'
|
||||
|
@ -23,86 +25,8 @@ on:
|
|||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
|
||||
test_podman_save:
|
||||
name: Podman save ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
# - git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
rm -rf /tmp/just_new_collection
|
||||
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
|
||||
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
|
||||
|
||||
- name: Run collection tests for podman save
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_save ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_save'
|
||||
display_name: 'Podman save'
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
name: Podman search
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_search.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_search.yml'
|
||||
- 'plugins/modules/podman_search.py'
|
||||
- 'tests/integration/targets/podman_search/**'
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_search.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_search.yml'
|
||||
- 'plugins/modules/podman_search.py'
|
||||
- 'tests/integration/targets/podman_search/**'
|
||||
schedule:
|
||||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
test_podman_search:
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_search'
|
||||
display_name: 'Podman search'
|
|
@ -4,6 +4,7 @@ on:
|
|||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_secret.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_secret.yml'
|
||||
|
@ -11,10 +12,11 @@ on:
|
|||
- 'plugins/modules/podman_container.py'
|
||||
- 'plugins/module_utils/podman/podman_container_lib.py'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_secret.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_secret.yml'
|
||||
|
@ -25,170 +27,9 @@ on:
|
|||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
|
||||
test_podman_secret:
|
||||
name: Podman secret ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
- git+https://github.com/ansible/ansible.git@stable-2.12
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_secret'
|
||||
display_name: 'Podman secret'
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
rm -rf /tmp/just_new_collection
|
||||
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
|
||||
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
|
||||
|
||||
- name: Run collection tests for podman secret
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_secret ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
|
||||
test_podman_secret_with_pip:
|
||||
name: Podman secret w/ pip ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
#- git+https://github.com/ansible/ansible.git@stable-2.10
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
python3 -m pip install --user --force-reinstall --upgrade .
|
||||
|
||||
|
||||
- name: Run collection tests for podman secret
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
export ANSIBLE_COLLECTIONS_PATHS=~/.local/share/ansible/collections
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_secret ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
name: Podman secret info
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_secret_info.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_secret_info.yml'
|
||||
- 'plugins/modules/podman_secret.py'
|
||||
- 'plugins/modules/podman_secret_info.py'
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_secret_info.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_secret_info.yml'
|
||||
- 'plugins/modules/podman_secret.py'
|
||||
- 'plugins/modules/podman_secret_info.py'
|
||||
schedule:
|
||||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
test_podman_secret_info:
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_secret_info'
|
||||
display_name: 'Podman secret info'
|
|
@ -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'
|
|
@ -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'
|
|
@ -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'
|
|
@ -4,16 +4,18 @@ on:
|
|||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_tag.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_tag.yml'
|
||||
- 'plugins/modules/podman_tag.py'
|
||||
- 'tests/integration/targets/podman_tag/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_tag.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_tag.yml'
|
||||
|
@ -23,86 +25,8 @@ on:
|
|||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
|
||||
test_podman_tag:
|
||||
name: Podman tag ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
# - git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
rm -rf /tmp/just_new_collection
|
||||
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
|
||||
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
|
||||
|
||||
- name: Run collection tests for podman tag
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_tag ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_tag'
|
||||
display_name: 'Podman tag'
|
||||
|
|
|
@ -4,105 +4,31 @@ on:
|
|||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_volume.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_volume.yml'
|
||||
- 'plugins/modules/podman_volume.py'
|
||||
- 'plugins/module_utils/podman/quadlet.py'
|
||||
- 'tests/integration/targets/podman_volume/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_volume.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_volume.yml'
|
||||
- 'plugins/modules/podman_volume.py'
|
||||
- 'plugins/module_utils/podman/quadlet.py'
|
||||
- 'tests/integration/targets/podman_volume/**'
|
||||
schedule:
|
||||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
|
||||
test_podman_volume:
|
||||
name: Podman volume ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
# - git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
rm -rf /tmp/just_new_collection
|
||||
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
|
||||
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
|
||||
|
||||
- name: Run collection tests for podman volume info
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_volume ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_volume'
|
||||
display_name: 'Podman volume'
|
||||
|
|
|
@ -4,6 +4,7 @@ on:
|
|||
push:
|
||||
paths:
|
||||
- '.github/workflows/podman_volume_info.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_volume_info.yml'
|
||||
|
@ -11,10 +12,11 @@ on:
|
|||
- 'plugins/modules/podman_volume.py'
|
||||
- 'tests/integration/targets/podman_volume_info/**'
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/podman_volume_info.yml'
|
||||
- '.github/workflows/reusable-module-test.yml'
|
||||
- 'ci/*.yml'
|
||||
- 'ci/run_containers_tests.sh'
|
||||
- 'ci/playbooks/containers/podman_volume_info.yml'
|
||||
|
@ -25,86 +27,8 @@ on:
|
|||
- cron: 4 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
|
||||
test_podman_volume_info:
|
||||
name: Podman volume info ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
|
||||
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ansible-version:
|
||||
- ansible<2.10
|
||||
# - git+https://github.com/ansible/ansible.git@stable-2.11
|
||||
- git+https://github.com/ansible/ansible.git@devel
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
python-version:
|
||||
- 3.9
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Upgrade pip and display Python and PIP versions
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python*-wheel python*-yaml
|
||||
python -m pip install --upgrade pip
|
||||
python -V
|
||||
pip --version
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install Ansible ${{ matrix.ansible-version }}
|
||||
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
|
||||
|
||||
- name: Build and install the collection tarball
|
||||
run: |
|
||||
rm -rf /tmp/just_new_collection
|
||||
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
|
||||
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
|
||||
|
||||
- name: Run collection tests for podman volume info
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
|
||||
echo "Run ansible version"
|
||||
command -v ansible
|
||||
ansible --version
|
||||
|
||||
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
|
||||
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
|
||||
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
|
||||
fi
|
||||
|
||||
echo $ANSIBLE_CONFIG
|
||||
command -v ansible-playbook
|
||||
pip --version
|
||||
python --version
|
||||
ansible-playbook --version
|
||||
|
||||
ansible-playbook -vv ci/playbooks/pre.yml \
|
||||
-e host=localhost \
|
||||
-i localhost, \
|
||||
-e ansible_connection=local \
|
||||
-e setup_python=false
|
||||
|
||||
TEST2RUN=podman_volume_info ./ci/run_containers_tests.sh
|
||||
shell: bash
|
||||
uses: ./.github/workflows/reusable-module-test.yml
|
||||
with:
|
||||
module_name: 'podman_volume_info'
|
||||
display_name: 'Podman volume info'
|
||||
|
|
|
@ -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
|
|
@ -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/**
|
|
@ -0,0 +1,59 @@
|
|||
name: Unittests
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: 3 0 * * * # Run daily at 0:03 UTC
|
||||
|
||||
jobs:
|
||||
build-collection-artifact:
|
||||
name: Test
|
||||
runs-on: ${{ matrix.runner-os }}
|
||||
strategy:
|
||||
matrix:
|
||||
runner-os:
|
||||
- ubuntu-22.04
|
||||
# ansible-version:
|
||||
# - git+https://github.com/ansible/ansible.git@stable-2.15
|
||||
runner-python-version:
|
||||
- '3.11'
|
||||
steps:
|
||||
|
||||
- name: Check out ${{ github.repository }} on disk
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Python ${{ matrix.runner-python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.runner-python-version }}
|
||||
|
||||
- name: Set up pip cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('tests/sanity/requirements.txt') }}-${{ hashFiles('tests/unit/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-
|
||||
|
||||
- name: Install requirements for tests
|
||||
run: >-
|
||||
python -m pip install --user -r test-requirements.txt
|
||||
|
||||
- name: Build a collection tarball
|
||||
run: >-
|
||||
~/.local/bin/ansible-galaxy collection build --output-path
|
||||
"${GITHUB_WORKSPACE}/.cache/collection-tarballs"
|
||||
|
||||
- name: Install the collection tarball
|
||||
run: >-
|
||||
~/.local/bin/ansible-galaxy collection install ${GITHUB_WORKSPACE}/.cache/collection-tarballs/*.tar.gz
|
||||
|
||||
- name: Run collection unit tests
|
||||
run: >-
|
||||
~/.local/bin/ansible-test units
|
||||
--python "${{ matrix.runner-python-version }}" -vvv
|
||||
tests/unit/plugins/modules/
|
||||
working-directory: >-
|
||||
/home/runner/.ansible/collections/ansible_collections/containers/podman
|
576
CHANGELOG.rst
576
CHANGELOG.rst
|
@ -5,6 +5,580 @@ Ansible Podman modules and plugins Release Notes
|
|||
.. contents:: Topics
|
||||
|
||||
|
||||
v1.17.0
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Minor changes and system info module
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- Add another test for volumes
|
||||
- Added checks for volume opts
|
||||
|
||||
New Modules
|
||||
-----------
|
||||
|
||||
- containers.podman.podman_system_info - Get podman system information from host machine
|
||||
|
||||
v1.16.4
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Bugfixes
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Document that sdnotify can be set to healthy
|
||||
- Fix CI for podman_image_info
|
||||
- Fix None values in LogOpt in Quadlet
|
||||
- Fix conditions in CI jobs
|
||||
- Fix idempotency for any podman secret driver
|
||||
- Fix idempotency for systemd keyword
|
||||
- Fix setuptools
|
||||
- Handle image arguments in podman_container
|
||||
- Remove docker protocol when inspecting image
|
||||
- Set custom tmpfs idempotency
|
||||
- Use usedforsecurity for hashlib.sha256 only in python version >=3.9
|
||||
- correctly quote labels and environment variables for quadlets
|
||||
- doc - podman_secret - fix indentation error in example
|
||||
- fix(podman_image) - correct intendation on 'loop' keyword
|
||||
|
||||
v1.16.3
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Bugfixes
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Don't pull image when state is absent or pull=never (#889)
|
||||
- Fix idempotency for containers with env vars containing MAX_SIZE (#893)
|
||||
- Fix list tags failure in podman_search (#875)
|
||||
- Fix podman_container_copy examples (#882)
|
||||
- docs(podman_container) - improve comments on network property (#878)
|
||||
|
||||
v1.16.2
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Bugfixes and Quadlet improvements
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Add missing parameters for podman container quadlet
|
||||
- Add new options for podman_network
|
||||
- Add option to specify kube file content in module
|
||||
- Add quadlet file mode option to specify file permission
|
||||
- Add secret to login module
|
||||
- Don't check image availability in Quadlet
|
||||
- Fix max_size idempotency issue
|
||||
- Fix typo in quadlet generator
|
||||
- Fix unsupported pull policy in example on podman_container.py
|
||||
- fix quadlet cmd_args append mistake
|
||||
- podman_login does not support check_mode
|
||||
|
||||
v1.16.1
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Bugfixes
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Fix podman image permissions issue and runlable test
|
||||
- don't document quadlet_dir as required when setting state=quadlet
|
||||
|
||||
v1.16.0
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
New features, podman copy module and bugfixes
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- Add arch to podman build command explicitly
|
||||
- Add group_add parameter for podman quadlet
|
||||
- Add support for check_mode in Quadlet
|
||||
- Trigger a new image build when we detect that the Containerfile has changed.
|
||||
- Update inspection info about objects in modules
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- CI - Add images removal for tests
|
||||
- CI - Fix podman CI test container images
|
||||
- CI - add ignore list for Ansible sanity for 2.19
|
||||
- CI - bump artifacts versions for GHactions
|
||||
- CI - change k8s.gcr.io to registry.k8s.io in tests
|
||||
- CI - fix Podman search of invalid image
|
||||
- Disable idempotency for pod_id_file
|
||||
- Fix command idempotency with quotes
|
||||
- Fix health-startup-cmd
|
||||
- Fix logic in Podman images
|
||||
- Fix quadlet parameters when container uses rootfs
|
||||
- fix for tls_verify being ignored
|
||||
- fix(podman_image) - skip empty volume items
|
||||
- fix(podman_save) - always changed when force
|
||||
- modify error and docs
|
||||
|
||||
New Modules
|
||||
-----------
|
||||
|
||||
- containers.podman.podman_container_copy - Copy file to or from a container
|
||||
|
||||
v1.15.4
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Bugfixes
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Fix missing entries in network quadlet generated file
|
||||
- Fix quadlet parameters for restart policy
|
||||
- Idempotency improvements
|
||||
|
||||
v1.15.3
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Bugfixes
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- CI Update python for latest Ansible to 3.11 in CI
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Fix idempotency for empty values
|
||||
- params gpus should be exit_policy
|
||||
|
||||
v1.15.2
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Inline Containerfile option for podman_image
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- Add option for inline Containerfile in podman_image
|
||||
|
||||
v1.15.1
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Bugfixes for systemd generation
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Fix idempotency for pods in case of systemd generation
|
||||
- Fix idempotency for systemd generations
|
||||
|
||||
v1.15.0
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Podman search module and bugfixes for Podman image
|
||||
|
||||
Major Changes
|
||||
-------------
|
||||
|
||||
- Add podman search
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Fix issue with pushing podman image to repo name and org
|
||||
|
||||
New Modules
|
||||
-----------
|
||||
|
||||
- containers.podman.podman_search - Search for remote images using podman
|
||||
|
||||
v1.14.0
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Idempotency redesign and a lot of new options
|
||||
|
||||
Major Changes
|
||||
-------------
|
||||
|
||||
- Add mount and unmount for volumes
|
||||
- Add multiple subnets for networks
|
||||
- Add new options for podman_container
|
||||
- Add new options to pod module
|
||||
- Improve idempotency for networking in podman_container
|
||||
- Redesign idempotency for Podman Pod module
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- Add autodiscovery for build context in podman_image
|
||||
- Add docs, tests and more examples for podman_pod
|
||||
- Add extra_args for podman_image push and pull
|
||||
- Add idempotency for mounts and volumes in podman_container
|
||||
- Add new functionality tests for podman_secret
|
||||
- Add path and env options for podman_secret
|
||||
- Add route, dns and ipam_driver to podman_network
|
||||
- Create podman secret when skip_existing=True and it does not exist
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Fix idempotency for pod with 0.0.0.0
|
||||
- Fix transports issues in podman_image
|
||||
- fix(#747) set correct HealthCmd
|
||||
|
||||
v1.13.0
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Quadlet support for Podman
|
||||
|
||||
Major Changes
|
||||
-------------
|
||||
|
||||
- Add quadlet support for Podman modules
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Fix pod info for non-existant pods
|
||||
|
||||
v1.12.1
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Support for Podman v5 and bugfixes
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- CI - Fix rootfs test in CI
|
||||
- CI - add custom podman path to tasks
|
||||
- CI - add parametrized executables to tests
|
||||
- podman_container - Add pasta as default network mode after v5
|
||||
- podman_container_exec - Return data for podman exec module
|
||||
- podman_generate_systemd - Fix broken example for podman_generate_systemd (#708)
|
||||
- podman_login - Update podman_login.py
|
||||
- podman_play - Add support for kube yaml files with multi-documents (#724)
|
||||
- podman_play - Update the logic for deleting pods/containers in podman_play
|
||||
- podman_pod_info - handle return being list in Podman 5 (#713)
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- podman_container - Add check and fixed for v5 network diff
|
||||
- podman_container - Fix pasta networking idempotency for v5 (#728)
|
||||
- podman_container_exec - Remove unnecessary quotes in podman_container_exec module
|
||||
- podman_image_info - Fix wrong return data type in podman_image_info
|
||||
- podman_play - Fix kube play annotations
|
||||
- podman_pod - Fix broken info of pods in Podman v5
|
||||
- podman_pod - Fix pod for Podman v5
|
||||
- podman_pod - Fix podman pod v5 broken info issue
|
||||
|
||||
v1.12.0
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
New podman_secret_info module, improvements and bugfixes
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- Add log_opt and annotaion options to podman_play module
|
||||
- Add option to parse CreateCommand easily for diff calc
|
||||
- Add support for setting underlying interface in podman_network
|
||||
- Alias generate systemd options stop_timeout and time
|
||||
- Fix CI rootfs for podman_container
|
||||
- Fix broken conmon version in CI install
|
||||
- Improve security_opt comparison between existing container
|
||||
- podman_container - Add new arguments to podman status commands
|
||||
- podman_container - Update env_file to accept a list of files instead of a single file
|
||||
- podman_secret_info - Add secrets info module
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Add idempotency for podman_secret module
|
||||
- Catch exceptions when no JSON output in podman_image
|
||||
- Fail if systemd generation failed and it's explicitly set
|
||||
- Fix example name
|
||||
- Fix idempotency for podman_network
|
||||
- Fix idempotency when using 0.0.0.0 in ports
|
||||
- Fix multi-image support for podman_save
|
||||
- Fix volume inspection by name in podman_volume
|
||||
- Recreate stopped containers if recreate flag is enabled
|
||||
|
||||
New Modules
|
||||
-----------
|
||||
|
||||
- containers.podman.podman_secret_info - Secrets info module
|
||||
|
||||
v1.11.0
|
||||
=======
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- Update docs
|
||||
|
||||
v1.10.4
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Bugfixes and new modules
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- podman_container - Add support for health-on-failure action
|
||||
- podman_image -Add target support for podman build image
|
||||
- podman_play - Add build and context_dir option to podman_play
|
||||
- podman_pod - Add options for resource limits to podman_pod
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Fix common file for Python 2.7
|
||||
- podman_network - Do not force network removal by default
|
||||
- podman_network - Fix network DNS enable idempotency issue
|
||||
- podman_pod - Fix idempotency when running inside Podman container
|
||||
|
||||
New Modules
|
||||
-----------
|
||||
|
||||
- containers.podman.podman_container_exec - Executes a command in a running container
|
||||
- containers.podman.podman_runlabel - Run given label from given image
|
||||
|
||||
v1.10.3
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Bugfixes and new options for modules
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- podman_container - Add diff and change detection to systemd generation
|
||||
- podman_container - Add example with quotes in command to docs
|
||||
- podman_container - Fix healthcheck issue where defined in image
|
||||
- podman_container - Fix idempoency issue with PID of container
|
||||
- podman_container - Fix idempotency for RestartPolicy when MaximumRetryCount
|
||||
- podman_container - Fix idempotency for devices
|
||||
- podman_container - Fixed idempotency with cpus parameter
|
||||
- podman_container - Improve docs about container env_file on remote machine
|
||||
- podman_container - added cpu_quota parameter to podman_container
|
||||
- podman_export,podman_import - Adding volume import and export option
|
||||
- podman_generate_systemd - Add a force field to podman_generate_systemd
|
||||
- podman_image - Add restart-sec and other options to systemd generation
|
||||
- podman_image - Fix pulling short image name
|
||||
|
||||
v1.10.2
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Bugfixes and docs changes
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Add hooks-dir parameter for containers
|
||||
- Add idempotency for restart-policy for containers
|
||||
- Add missing options to podman network
|
||||
- Add more explanation about cmd_args command usage
|
||||
- Add stdout to podman build and push actions
|
||||
- Added support for "userns" parameter to "play" module
|
||||
- CI - fix pip installation of the collection
|
||||
- CI - fix podman play job for 4.4.x versions
|
||||
- Change yes/no to true/false in the modules
|
||||
- Convert str to json format before evaluating length.
|
||||
- Fix CI for newest Ansible branch 2.16
|
||||
- Fix idempotency for pods with uidmap and gidmap
|
||||
- Fix idempotency lowercase for devices
|
||||
- Fix network tests for Podman v4
|
||||
- Fix podman logout tests for v4
|
||||
- Fix pylint issues for CI ansible-test
|
||||
- Fix undesirable splitting of IPv6 host addresses
|
||||
- Improved documentation of `podman_generate_systemd` module
|
||||
- Prepare CI for Podman v3 backward compatibility
|
||||
- Support SHA256 tag for podman images
|
||||
- Update podman_image to specify CPU arch when pulling image
|
||||
- added podman_prune module
|
||||
- become plugin podman_unshare become_user default
|
||||
- fix for buildah improper remote target
|
||||
- for pod kube recreate
|
||||
- pod - Support passing multiple networks with params
|
||||
- podman-login - fix FIPS md5 issue and registry requirement
|
||||
- podman-pod - Fix idempotency for pods in 4.4.x versions
|
||||
- podman_systemd - Ignore header when comparing systemd files content
|
||||
|
||||
v1.10.1
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Bugfixes and minor docs changes
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- Add missed docs for modules
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- podman_systemd_generate - allow empty string for prefixes
|
||||
- podman_unshare - Fix docs for podman_unshare become plugin
|
||||
|
||||
v1.10.0
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
New modules, become plugin and bugfixes.
|
||||
|
||||
Major Changes
|
||||
-------------
|
||||
|
||||
- New become plugin - podman_unshare
|
||||
- Podman generate systemd module
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- Add --sdnotify option for container
|
||||
- Add example unittest for container lib
|
||||
- Add protection for systemd files deletion
|
||||
- Add unittests for Ansible Podman modules
|
||||
- Check for gha updates weekly using dependabot
|
||||
- Fix PEP8 issue in podman_image
|
||||
- Fix building image with buildah and become
|
||||
- Fix docs issues in podman_image
|
||||
- Warning about improperly configured remote target
|
||||
- add required argument to example
|
||||
- docs - added simple extra_args example
|
||||
- generate_systemd - implement --wants, --after and --requires
|
||||
- podman_image - add file parameter for Containerfile location
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Delete systemd files when container/pod is deleted
|
||||
- Fix example in systemd generate module
|
||||
- Fix expanduser in path for systemd generation
|
||||
- Fix idempotency for labels in pods
|
||||
- Fix podman load module for Podman 4
|
||||
- Fix rerunning playbooks with generate_systemd --new
|
||||
- Improve idempotency for devices mount of rootless podman
|
||||
- Improve networks idempotency for v4
|
||||
- Support passing multiple networks with params
|
||||
- fix pod running status for older podman versions
|
||||
- podman_container should ensure image by using os path if rootfs is used
|
||||
|
||||
v1.9.4
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Bugfixes and minor changes
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- Remove distutils as deprecated
|
||||
- Run CI on Ubuntu 22.04
|
||||
- Use 2.13 Ansible version in CI jobs instead of 2.11
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- connection_podman - Add missing docstring for method that executes the podman commands
|
||||
- podman_container - Change IpcMode default to shareable
|
||||
- podman_container - Disable memory idempotency
|
||||
- podman_container - Fix typo in the documentation
|
||||
- podman_image - Update `podman_image` to remove image with image id
|
||||
- podman_load - Loop over image names when multiple images present in archive
|
||||
- podman_login - Fix idempotency for podman_login
|
||||
- podman_network - Allow specify podman_network options MTU and VLAN separately
|
||||
- podman_network - Fix internal networks idempotency
|
||||
- podman_play - Fix play_kube not working when yaml not installed on target
|
||||
- podman_play - Pass errors as a string instead of list
|
||||
- podman_pod - Change network attribute from str to list in pods
|
||||
- podman_pod - Fix pod network idempotency
|
||||
- podman_pod - Fix pod tests in CI
|
||||
- podman_pod - Fix pods list retrieve
|
||||
|
||||
v1.9.3
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Bugfixes and minor changes
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- Fix sanity issues with a new Ansible version
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Remove idempotency for log level
|
||||
|
||||
v1.9.2
|
||||
======
|
||||
|
||||
|
@ -115,7 +689,7 @@ Bugfixes
|
|||
- Don't add newlines to secrets
|
||||
- Fix issue with podman and exposed ports
|
||||
- Fix signal diff for truncated and RT signal names
|
||||
- Support empty stings in prefixes
|
||||
- Support empty strings in prefixes
|
||||
- Update error message when pull set to false
|
||||
|
||||
v1.8.1
|
||||
|
|
|
@ -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).
|
||||
|
|
|
@ -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
204
README.md
|
@ -1,113 +1,117 @@
|
|||
[](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.
|
||||
[](https://github.com/containers/ansible-podman-collections/actions/workflows/collection-continuous-integration.yml)
|
||||
[](https://galaxy.ansible.com/containers/podman)
|
||||
[](COPYING)
|
||||
|
||||
The collection includes the Podman container plugins to help the build and management of Podman containers.
|
||||
**Manage the full lifecycle of Podman containers, images, pods, networks, and volumes with Ansible.**
|
||||
|
||||
This collection provides a suite of powerful and flexible Ansible modules to automate the management of your [Podman](https://podman.io/) environment. Whether you are running a single container or orchestrating complex, multi-container applications, these modules give you the tools to do it idempotently and efficiently.
|
||||
|
||||
---
|
||||
|
||||
### **Table of Contents**
|
||||
|
||||
- [Key Features](#key-features)
|
||||
- [Requirements](#requirements)
|
||||
- [Installation](#installation)
|
||||
- [Getting Started: A Simple Example](#getting-started-a-simple-example)
|
||||
- [Available Content](#available-content)
|
||||
- [Documentation](#documentation)
|
||||
- [Contributing](#contributing)
|
||||
- [License](#license)
|
||||
|
||||
---
|
||||
|
||||
## Key Features
|
||||
|
||||
- **Comprehensive Management:** Control every aspect of Podman, including containers, images, pods, networks, volumes, and secrets.
|
||||
- **Idempotent Operations:** All modules are designed to be idempotent, ensuring predictable and consistent state for your resources.
|
||||
- **Flexible and Powerful:** Exposes a wide range of Podman options, from simple container creation to advanced features like systemd integration and Quadlet file generation.
|
||||
- **Connection Plugin:** Includes a `podman` connection plugin to execute Ansible tasks directly inside containers.
|
||||
|
||||
## Requirements
|
||||
|
||||
- **Ansible:** `ansible-core >= 2.12`
|
||||
- **Python:** `python >= 3.9`
|
||||
- **Podman:** A working installation of Podman on the target machine.
|
||||
|
||||
## Installation
|
||||
|
||||
Install the collection from Ansible Galaxy using the `ansible-galaxy` CLI:
|
||||
|
||||
```bash
|
||||
ansible-galaxy collection install containers.podman
|
||||
```
|
||||
|
||||
You can also include it in a `requirements.yml` file, which is useful for managing project dependencies:
|
||||
|
||||
```yaml
|
||||
# requirements.yml
|
||||
collections:
|
||||
- name: containers.podman
|
||||
```
|
||||
|
||||
Then, install it with:
|
||||
|
||||
```bash
|
||||
ansible-galaxy collection install -r requirements.yml
|
||||
```
|
||||
|
||||
## Getting Started: A Simple Example
|
||||
|
||||
Here is a quick example of how to ensure a Redis container is running using the `podman_container` module.
|
||||
|
||||
```yaml
|
||||
---
|
||||
- name: Deploy a Redis container with Podman
|
||||
hosts: localhost
|
||||
connection: local
|
||||
|
||||
tasks:
|
||||
- name: Ensure the Redis container is running
|
||||
containers.podman.podman_container:
|
||||
name: my-redis-cache
|
||||
image: docker.io/redis:alpine
|
||||
state: started
|
||||
ports:
|
||||
- "6379:6379"
|
||||
restart_policy: "always"
|
||||
```
|
||||
|
||||
## Available Content
|
||||
|
||||
This collection includes:
|
||||
|
||||
- **Modules:**
|
||||
- `podman_container`: Manage Podman containers.
|
||||
- `podman_image`: Build, pull, and manage Podman images.
|
||||
- `podman_pod`: Create and manage Podman pods.
|
||||
- `podman_network`: Manage Podman networks.
|
||||
- `podman_volume`: Manage Podman volumes.
|
||||
- `podman_secret`: Manage Podman secrets.
|
||||
- `podman_login`/`podman_logout`: Authenticate with container registries.
|
||||
- ...and many more!
|
||||
|
||||
- **Connection Plugins:**
|
||||
- `podman`: Execute Ansible tasks directly within a container.
|
||||
- `buildah`: Execute Ansible tasks directly within a buildah container.
|
||||
|
||||
- **Become Plugins:**
|
||||
- `podman_unshare`: Execute tasks within a `podman unshare` environment.
|
||||
|
||||
## Documentation
|
||||
|
||||
For collection versions that are parts of Ansible releases, the documentation can be found on
|
||||
Ansible docs site: https://docs.ansible.com/ansible/latest/collections/containers/podman
|
||||
|
||||
The latest documentation for current collection version in the repository is hosted on github.io docs
|
||||
site: https://containers.github.io/ansible-podman-collections.
|
||||
|
||||
## Installation and Usage
|
||||
|
||||
### Installing the Collection from Ansible Galaxy
|
||||
|
||||
Before using the Podman collection, you need to install the collection with the `ansible-galaxy` CLI:
|
||||
|
||||
`ansible-galaxy collection install containers.podman`
|
||||
|
||||
You can also include it in a `requirements.yml` file and install it via
|
||||
`ansible-galaxy collection install -r requirements.yml` using the format:
|
||||
|
||||
```yaml
|
||||
collections:
|
||||
- name: containers.podman
|
||||
```
|
||||
|
||||
or clone by your own:
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.ansible/collections/ansible_collections/containers
|
||||
git clone https://github.com/containers/ansible-podman-collections.git ~/.ansible/collections/ansible_collections/containers/podman
|
||||
```
|
||||
|
||||
### Playbooks
|
||||
|
||||
To use a module from Podman collection, please reference the full namespace, collection name,
|
||||
and modules name that you want to use:
|
||||
|
||||
```yaml
|
||||
---
|
||||
- name: Using Podman collection
|
||||
hosts: localhost
|
||||
tasks:
|
||||
- name: Run redis container
|
||||
containers.podman.podman_container:
|
||||
name: myredis
|
||||
image: redis
|
||||
command: redis-server --appendonly yes
|
||||
state: present
|
||||
recreate: yes
|
||||
expose:
|
||||
- 6379
|
||||
volumes_from:
|
||||
- mydata
|
||||
```
|
||||
|
||||
Or you can add full namespace and collection name in the `collections` element:
|
||||
|
||||
```yaml
|
||||
---
|
||||
- name: Using Podman collection
|
||||
hosts: localhost
|
||||
collections:
|
||||
- containers.podman
|
||||
tasks:
|
||||
- name: Build and push an image using existing credentials
|
||||
podman_image:
|
||||
name: nginx
|
||||
path: /path/to/build/dir
|
||||
push: yes
|
||||
push_args:
|
||||
dest: quay.io/acme
|
||||
```
|
||||
- **Official Ansible Docs:** For stable, released versions of the collection, see the documentation on the [official Ansible documentation site](https://docs.ansible.com/ansible/latest/collections/containers/podman/index.html).
|
||||
- **Latest Development Version:** For the most up-to-date documentation based on the `main` branch of this repository, visit our [GitHub Pages site](https://containers.github.io/ansible-podman-collections/).
|
||||
|
||||
## Contributing
|
||||
|
||||
We are accepting Github pull requests and issues.
|
||||
There are many ways in which you can participate in the project, for example:
|
||||
We welcome contributions from the community! Whether you want to fix a bug, add a new feature, or improve our documentation, your help is valuable.
|
||||
|
||||
- Submit bugs and feature requests, and help us verify them
|
||||
- Submit and review source code changes in Github pull requests
|
||||
- Add new modules for Podman containers and images
|
||||
|
||||
## Testing and Development
|
||||
|
||||
If you want to develop new content for this collection or improve what is already
|
||||
here, the easiest way to work on the collection is to clone it into one of the configured
|
||||
[`COLLECTIONS_PATHS`](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#collections-paths),
|
||||
and work on it there.
|
||||
|
||||
### Testing with `ansible-test`
|
||||
|
||||
We use `ansible-test` for sanity.
|
||||
|
||||
## More Information
|
||||
|
||||
TBD
|
||||
|
||||
## Communication
|
||||
|
||||
Please submit Github issues for communication any issues.
|
||||
You can ask Podman related questions on `#podman` channel of Ansible Podman questions
|
||||
on `#ansible-podman` channel on Freenode IRC.
|
||||
Please read our **[Contributing Guide](CONTRIBUTING.md)** to learn how to get started with development, testing, and submitting pull requests.
|
||||
|
||||
## License
|
||||
|
||||
GPL-3.0-or-later
|
||||
This collection is licensed under the [GNU General Public License v3.0 or later](COPYING).
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -107,6 +107,348 @@ releases:
|
|||
- Add pip installation for podman collection.
|
||||
release_summary: Pip install and minor fixes.
|
||||
release_date: '2020-08-06'
|
||||
1.10.0:
|
||||
changes:
|
||||
bugfixes:
|
||||
- Delete systemd files when container/pod is deleted
|
||||
- Fix example in systemd generate module
|
||||
- Fix expanduser in path for systemd generation
|
||||
- Fix idempotency for labels in pods
|
||||
- Fix podman load module for Podman 4
|
||||
- Fix rerunning playbooks with generate_systemd --new
|
||||
- Improve idempotency for devices mount of rootless podman
|
||||
- Improve networks idempotency for v4
|
||||
- Support passing multiple networks with params
|
||||
- fix pod running status for older podman versions
|
||||
- podman_container should ensure image by using os path if rootfs is used
|
||||
major_changes:
|
||||
- New become plugin - podman_unshare
|
||||
- Podman generate systemd module
|
||||
minor_changes:
|
||||
- Add --sdnotify option for container
|
||||
- Add example unittest for container lib
|
||||
- Add protection for systemd files deletion
|
||||
- Add unittests for Ansible Podman modules
|
||||
- Check for gha updates weekly using dependabot
|
||||
- Fix PEP8 issue in podman_image
|
||||
- Fix building image with buildah and become
|
||||
- Fix docs issues in podman_image
|
||||
- Warning about improperly configured remote target
|
||||
- add required argument to example
|
||||
- docs - added simple extra_args example
|
||||
- generate_systemd - implement --wants, --after and --requires
|
||||
- podman_image - add file parameter for Containerfile location
|
||||
release_summary: New modules, become plugin and bugfixes.
|
||||
release_date: '2022-11-17'
|
||||
1.10.1:
|
||||
changes:
|
||||
bugfixes:
|
||||
- podman_systemd_generate - allow empty string for prefixes
|
||||
- podman_unshare - Fix docs for podman_unshare become plugin
|
||||
minor_changes:
|
||||
- Add missed docs for modules
|
||||
release_summary: Bugfixes and minor docs changes
|
||||
release_date: '2022-11-22'
|
||||
1.10.2:
|
||||
changes:
|
||||
bugfixes:
|
||||
- Add hooks-dir parameter for containers
|
||||
- Add idempotency for restart-policy for containers
|
||||
- Add missing options to podman network
|
||||
- Add more explanation about cmd_args command usage
|
||||
- Add stdout to podman build and push actions
|
||||
- Added support for "userns" parameter to "play" module
|
||||
- CI - fix pip installation of the collection
|
||||
- CI - fix podman play job for 4.4.x versions
|
||||
- Change yes/no to true/false in the modules
|
||||
- Convert str to json format before evaluating length.
|
||||
- Fix CI for newest Ansible branch 2.16
|
||||
- Fix idempotency for pods with uidmap and gidmap
|
||||
- Fix idempotency lowercase for devices
|
||||
- Fix network tests for Podman v4
|
||||
- Fix podman logout tests for v4
|
||||
- Fix pylint issues for CI ansible-test
|
||||
- Fix undesirable splitting of IPv6 host addresses
|
||||
- Improved documentation of `podman_generate_systemd` module
|
||||
- Prepare CI for Podman v3 backward compatibility
|
||||
- Support SHA256 tag for podman images
|
||||
- Update podman_image to specify CPU arch when pulling image
|
||||
- added podman_prune module
|
||||
- become plugin podman_unshare become_user default
|
||||
- fix for buildah improper remote target
|
||||
- for pod kube recreate
|
||||
- pod - Support passing multiple networks with params
|
||||
- podman-login - fix FIPS md5 issue and registry requirement
|
||||
- podman-pod - Fix idempotency for pods in 4.4.x versions
|
||||
- podman_systemd - Ignore header when comparing systemd files content
|
||||
release_summary: Bugfixes and docs changes
|
||||
release_date: '2023-05-31'
|
||||
1.10.3:
|
||||
changes:
|
||||
bugfixes:
|
||||
- podman_container - Add diff and change detection to systemd generation
|
||||
- podman_container - Add example with quotes in command to docs
|
||||
- podman_container - Fix healthcheck issue where defined in image
|
||||
- podman_container - Fix idempoency issue with PID of container
|
||||
- podman_container - Fix idempotency for RestartPolicy when MaximumRetryCount
|
||||
- podman_container - Fix idempotency for devices
|
||||
- podman_container - Fixed idempotency with cpus parameter
|
||||
- podman_container - Improve docs about container env_file on remote machine
|
||||
- podman_container - added cpu_quota parameter to podman_container
|
||||
- podman_export,podman_import - Adding volume import and export option
|
||||
- podman_generate_systemd - Add a force field to podman_generate_systemd
|
||||
- podman_image - Add restart-sec and other options to systemd generation
|
||||
- podman_image - Fix pulling short image name
|
||||
release_summary: Bugfixes and new options for modules
|
||||
release_date: '2023-08-15'
|
||||
1.10.4:
|
||||
changes:
|
||||
bugfixes:
|
||||
- Fix common file for Python 2.7
|
||||
- podman_network - Do not force network removal by default
|
||||
- podman_network - Fix network DNS enable idempotency issue
|
||||
- podman_pod - Fix idempotency when running inside Podman container
|
||||
minor_changes:
|
||||
- podman_container - Add support for health-on-failure action
|
||||
- podman_image -Add target support for podman build image
|
||||
- podman_play - Add build and context_dir option to podman_play
|
||||
- podman_pod - Add options for resource limits to podman_pod
|
||||
release_summary: Bugfixes and new modules
|
||||
modules:
|
||||
- description: Executes a command in a running container
|
||||
name: podman_container_exec
|
||||
namespace: ''
|
||||
- description: Run given label from given image
|
||||
name: podman_runlabel
|
||||
namespace: ''
|
||||
release_date: '2023-11-01'
|
||||
1.11.0:
|
||||
changes:
|
||||
minor_changes:
|
||||
- Update docs
|
||||
release_date: '2023-11-05'
|
||||
1.12.0:
|
||||
changes:
|
||||
bugfixes:
|
||||
- Add idempotency for podman_secret module
|
||||
- Catch exceptions when no JSON output in podman_image
|
||||
- Fail if systemd generation failed and it's explicitly set
|
||||
- Fix example name
|
||||
- Fix idempotency for podman_network
|
||||
- Fix idempotency when using 0.0.0.0 in ports
|
||||
- Fix multi-image support for podman_save
|
||||
- Fix volume inspection by name in podman_volume
|
||||
- Recreate stopped containers if recreate flag is enabled
|
||||
minor_changes:
|
||||
- Add log_opt and annotaion options to podman_play module
|
||||
- Add option to parse CreateCommand easily for diff calc
|
||||
- Add support for setting underlying interface in podman_network
|
||||
- Alias generate systemd options stop_timeout and time
|
||||
- Fix CI rootfs for podman_container
|
||||
- Fix broken conmon version in CI install
|
||||
- Improve security_opt comparison between existing container
|
||||
- podman_container - Add new arguments to podman status commands
|
||||
- podman_container - Update env_file to accept a list of files instead of a
|
||||
single file
|
||||
- podman_secret_info - Add secrets info module
|
||||
release_summary: New podman_secret_info module, improvements and bugfixes
|
||||
modules:
|
||||
- description: Secrets info module
|
||||
name: podman_secret_info
|
||||
namespace: ''
|
||||
release_date: '2024-01-30'
|
||||
1.12.1:
|
||||
changes:
|
||||
bugfixes:
|
||||
- podman_container - Add check and fixed for v5 network diff
|
||||
- podman_container - Fix pasta networking idempotency for v5 (#728)
|
||||
- podman_container_exec - Remove unnecessary quotes in podman_container_exec
|
||||
module
|
||||
- podman_image_info - Fix wrong return data type in podman_image_info
|
||||
- podman_play - Fix kube play annotations
|
||||
- podman_pod - Fix broken info of pods in Podman v5
|
||||
- podman_pod - Fix pod for Podman v5
|
||||
- podman_pod - Fix podman pod v5 broken info issue
|
||||
minor_changes:
|
||||
- CI - Fix rootfs test in CI
|
||||
- CI - add custom podman path to tasks
|
||||
- CI - add parametrized executables to tests
|
||||
- podman_container - Add pasta as default network mode after v5
|
||||
- podman_container_exec - Return data for podman exec module
|
||||
- podman_generate_systemd - Fix broken example for podman_generate_systemd (#708)
|
||||
- podman_login - Update podman_login.py
|
||||
- podman_play - Add support for kube yaml files with multi-documents (#724)
|
||||
- podman_play - Update the logic for deleting pods/containers in podman_play
|
||||
- podman_pod_info - handle return being list in Podman 5 (#713)
|
||||
release_summary: Support for Podman v5 and bugfixes
|
||||
release_date: '2024-04-08'
|
||||
1.13.0:
|
||||
changes:
|
||||
bugfixes:
|
||||
- Fix pod info for non-existant pods
|
||||
major_changes:
|
||||
- Add quadlet support for Podman modules
|
||||
release_summary: Quadlet support for Podman
|
||||
release_date: '2024-04-22'
|
||||
1.14.0:
|
||||
changes:
|
||||
bugfixes:
|
||||
- Fix idempotency for pod with 0.0.0.0
|
||||
- Fix transports issues in podman_image
|
||||
- fix(#747) set correct HealthCmd
|
||||
major_changes:
|
||||
- Add mount and unmount for volumes
|
||||
- Add multiple subnets for networks
|
||||
- Add new options for podman_container
|
||||
- Add new options to pod module
|
||||
- Improve idempotency for networking in podman_container
|
||||
- Redesign idempotency for Podman Pod module
|
||||
minor_changes:
|
||||
- Add autodiscovery for build context in podman_image
|
||||
- Add docs, tests and more examples for podman_pod
|
||||
- Add extra_args for podman_image push and pull
|
||||
- Add idempotency for mounts and volumes in podman_container
|
||||
- Add new functionality tests for podman_secret
|
||||
- Add path and env options for podman_secret
|
||||
- Add route, dns and ipam_driver to podman_network
|
||||
- Create podman secret when skip_existing=True and it does not exist
|
||||
release_summary: Idempotency redesign and a lot of new options
|
||||
release_date: '2024-05-30'
|
||||
1.15.0:
|
||||
changes:
|
||||
bugfixes:
|
||||
- Fix issue with pushing podman image to repo name and org
|
||||
major_changes:
|
||||
- Add podman search
|
||||
release_summary: Podman search module and bugfixes for Podman image
|
||||
modules:
|
||||
- description: Search for remote images using podman
|
||||
name: podman_search
|
||||
namespace: ''
|
||||
release_date: '2024-06-03'
|
||||
1.15.1:
|
||||
changes:
|
||||
bugfixes:
|
||||
- Fix idempotency for pods in case of systemd generation
|
||||
- Fix idempotency for systemd generations
|
||||
release_summary: Bugfixes for systemd generation
|
||||
release_date: '2024-06-07'
|
||||
1.15.2:
|
||||
changes:
|
||||
minor_changes:
|
||||
- Add option for inline Containerfile in podman_image
|
||||
release_summary: Inline Containerfile option for podman_image
|
||||
release_date: '2024-06-11'
|
||||
1.15.3:
|
||||
changes:
|
||||
bugfixes:
|
||||
- Fix idempotency for empty values
|
||||
- params gpus should be exit_policy
|
||||
minor_changes:
|
||||
- CI Update python for latest Ansible to 3.11 in CI
|
||||
release_summary: Bugfixes
|
||||
release_date: '2024-06-20'
|
||||
1.15.4:
|
||||
changes:
|
||||
bugfixes:
|
||||
- Fix missing entries in network quadlet generated file
|
||||
- Fix quadlet parameters for restart policy
|
||||
- Idempotency improvements
|
||||
release_summary: Bugfixes
|
||||
release_date: '2024-07-12'
|
||||
1.16.0:
|
||||
changes:
|
||||
bugfixes:
|
||||
- CI - Add images removal for tests
|
||||
- CI - Fix podman CI test container images
|
||||
- CI - add ignore list for Ansible sanity for 2.19
|
||||
- CI - bump artifacts versions for GHactions
|
||||
- CI - change k8s.gcr.io to registry.k8s.io in tests
|
||||
- CI - fix Podman search of invalid image
|
||||
- Disable idempotency for pod_id_file
|
||||
- Fix command idempotency with quotes
|
||||
- Fix health-startup-cmd
|
||||
- Fix logic in Podman images
|
||||
- Fix quadlet parameters when container uses rootfs
|
||||
- fix for tls_verify being ignored
|
||||
- fix(podman_image) - skip empty volume items
|
||||
- fix(podman_save) - always changed when force
|
||||
- modify error and docs
|
||||
minor_changes:
|
||||
- Add arch to podman build command explicitly
|
||||
- Add group_add parameter for podman quadlet
|
||||
- Add support for check_mode in Quadlet
|
||||
- Trigger a new image build when we detect that the Containerfile has changed.
|
||||
- Update inspection info about objects in modules
|
||||
release_summary: New features, podman copy module and bugfixes
|
||||
modules:
|
||||
- description: Copy file to or from a container
|
||||
name: podman_container_copy
|
||||
namespace: ''
|
||||
release_date: '2024-09-24'
|
||||
1.16.1:
|
||||
changes:
|
||||
bugfixes:
|
||||
- Fix podman image permissions issue and runlable test
|
||||
- don't document quadlet_dir as required when setting state=quadlet
|
||||
release_summary: Bugfixes
|
||||
release_date: '2024-09-26'
|
||||
1.16.2:
|
||||
changes:
|
||||
bugfixes:
|
||||
- Add missing parameters for podman container quadlet
|
||||
- Add new options for podman_network
|
||||
- Add option to specify kube file content in module
|
||||
- Add quadlet file mode option to specify file permission
|
||||
- Add secret to login module
|
||||
- Don't check image availability in Quadlet
|
||||
- Fix max_size idempotency issue
|
||||
- Fix typo in quadlet generator
|
||||
- Fix unsupported pull policy in example on podman_container.py
|
||||
- fix quadlet cmd_args append mistake
|
||||
- podman_login does not support check_mode
|
||||
release_summary: Bugfixes and Quadlet improvements
|
||||
release_date: '2024-11-03'
|
||||
1.16.3:
|
||||
changes:
|
||||
bugfixes:
|
||||
- Don't pull image when state is absent or pull=never (#889)
|
||||
- Fix idempotency for containers with env vars containing MAX_SIZE (#893)
|
||||
- Fix list tags failure in podman_search (#875)
|
||||
- Fix podman_container_copy examples (#882)
|
||||
- docs(podman_container) - improve comments on network property (#878)
|
||||
release_summary: Bugfixes
|
||||
release_date: '2025-01-29'
|
||||
1.16.4:
|
||||
changes:
|
||||
bugfixes:
|
||||
- Document that sdnotify can be set to healthy
|
||||
- Fix CI for podman_image_info
|
||||
- Fix None values in LogOpt in Quadlet
|
||||
- Fix conditions in CI jobs
|
||||
- Fix idempotency for any podman secret driver
|
||||
- Fix idempotency for systemd keyword
|
||||
- Fix setuptools
|
||||
- Handle image arguments in podman_container
|
||||
- Remove docker protocol when inspecting image
|
||||
- Set custom tmpfs idempotency
|
||||
- Use usedforsecurity for hashlib.sha256 only in python version >=3.9
|
||||
- correctly quote labels and environment variables for quadlets
|
||||
- doc - podman_secret - fix indentation error in example
|
||||
- fix(podman_image) - correct intendation on 'loop' keyword
|
||||
release_summary: Bugfixes
|
||||
release_date: '2025-06-04'
|
||||
1.17.0:
|
||||
changes:
|
||||
minor_changes:
|
||||
- Add another test for volumes
|
||||
- Added checks for volume opts
|
||||
release_summary: Minor changes and system info module
|
||||
modules:
|
||||
- description: Get podman system information from host machine
|
||||
name: podman_system_info
|
||||
namespace: ''
|
||||
release_date: '2025-06-26'
|
||||
1.2.0:
|
||||
changes:
|
||||
minor_changes:
|
||||
|
@ -335,7 +677,7 @@ releases:
|
|||
- Don't add newlines to secrets
|
||||
- Fix issue with podman and exposed ports
|
||||
- Fix signal diff for truncated and RT signal names
|
||||
- Support empty stings in prefixes
|
||||
- Support empty strings in prefixes
|
||||
- Update error message when pull set to false
|
||||
release_summary: Fixes for various modules
|
||||
release_date: '2021-11-09'
|
||||
|
@ -390,3 +732,36 @@ releases:
|
|||
- Add requires option to podman_container module
|
||||
release_summary: Bugfixes and new requires option for podman_container
|
||||
release_date: '2022-03-21'
|
||||
1.9.3:
|
||||
changes:
|
||||
bugfixes:
|
||||
- Remove idempotency for log level
|
||||
minor_changes:
|
||||
- Fix sanity issues with a new Ansible version
|
||||
release_summary: Bugfixes and minor changes
|
||||
release_date: '2022-03-29'
|
||||
1.9.4:
|
||||
changes:
|
||||
bugfixes:
|
||||
- connection_podman - Add missing docstring for method that executes the podman
|
||||
commands
|
||||
- podman_container - Change IpcMode default to shareable
|
||||
- podman_container - Disable memory idempotency
|
||||
- podman_container - Fix typo in the documentation
|
||||
- podman_image - Update `podman_image` to remove image with image id
|
||||
- podman_load - Loop over image names when multiple images present in archive
|
||||
- podman_login - Fix idempotency for podman_login
|
||||
- podman_network - Allow specify podman_network options MTU and VLAN separately
|
||||
- podman_network - Fix internal networks idempotency
|
||||
- podman_play - Fix play_kube not working when yaml not installed on target
|
||||
- podman_play - Pass errors as a string instead of list
|
||||
- podman_pod - Change network attribute from str to list in pods
|
||||
- podman_pod - Fix pod network idempotency
|
||||
- podman_pod - Fix pod tests in CI
|
||||
- podman_pod - Fix pods list retrieve
|
||||
minor_changes:
|
||||
- Remove distutils as deprecated
|
||||
- Run CI on Ubuntu 22.04
|
||||
- Use 2.13 Ansible version in CI jobs instead of 2.11
|
||||
release_summary: Bugfixes and minor changes
|
||||
release_date: '2022-07-04'
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
shell: >-
|
||||
{% if ansible_venv is defined %}source {{ ansible_venv }}/bin/activate; {% endif %}
|
||||
|
||||
{{ repo_dir }}/ci/run_connection_test.sh
|
||||
{{ repo_dir }}/ci/run_connection_test.sh podman {{ test_executable | default('podman') }}
|
||||
args:
|
||||
chdir: "{{ repo_dir }}"
|
||||
executable: /bin/bash
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
- hosts: all
|
||||
gather_facts: true
|
||||
tasks:
|
||||
- include_role:
|
||||
name: podman_container_copy
|
||||
vars:
|
||||
ansible_python_interpreter: "{{ _ansible_python_interpreter }}"
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
- hosts: all
|
||||
gather_facts: true
|
||||
tasks:
|
||||
- include_role:
|
||||
name: podman_container_exec
|
||||
vars:
|
||||
ansible_python_interpreter: "{{ _ansible_python_interpreter }}"
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
- hosts: all
|
||||
gather_facts: true
|
||||
tasks:
|
||||
- include_role:
|
||||
name: podman_generate_systemd
|
||||
vars:
|
||||
ansible_python_interpreter: "{{ _ansible_python_interpreter }}"
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
- hosts: all
|
||||
gather_facts: true
|
||||
tasks:
|
||||
- include_role:
|
||||
name: podman_prune
|
||||
vars:
|
||||
ansible_python_interpreter: "/usr/bin/python"
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
- hosts: all
|
||||
gather_facts: true
|
||||
tasks:
|
||||
- include_role:
|
||||
name: podman_runlabel
|
||||
vars:
|
||||
runlabel_image: runlabel_test
|
||||
ansible_python_interpreter: "{{ _ansible_python_interpreter }}"
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
- hosts: all
|
||||
gather_facts: true
|
||||
tasks:
|
||||
- include_role:
|
||||
name: podman_search
|
||||
vars:
|
||||
ansible_python_interpreter: "{{ _ansible_python_interpreter }}"
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
- hosts: all
|
||||
gather_facts: true
|
||||
tasks:
|
||||
- include_role:
|
||||
name: podman_secret_info
|
||||
vars:
|
||||
idem_image: idempotency_test
|
||||
ansible_python_interpreter: "{{ _ansible_python_interpreter }}"
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
- hosts: all
|
||||
gather_facts: true
|
||||
tasks:
|
||||
- include_role:
|
||||
name: podman_system_connection
|
||||
vars:
|
||||
ansible_python_interpreter: "{{ _ansible_python_interpreter }}"
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
- hosts: all
|
||||
gather_facts: true
|
||||
tasks:
|
||||
- include_role:
|
||||
name: podman_system_connection_info
|
||||
vars:
|
||||
ansible_python_interpreter: "{{ _ansible_python_interpreter }}"
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
- hosts: all
|
||||
gather_facts: true
|
||||
tasks:
|
||||
- include_role:
|
||||
name: podman_system_info
|
||||
vars:
|
||||
ansible_python_interpreter: "{{ _ansible_python_interpreter }}"
|
|
@ -1,4 +1,15 @@
|
|||
---
|
||||
- name: Install repo for ubuntu
|
||||
become: true
|
||||
shell: |
|
||||
. /etc/os-release
|
||||
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${VERSION_ID}/ /" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
|
||||
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${VERSION_ID}/Release.key | apt-key add -
|
||||
apt-get update
|
||||
when:
|
||||
- ansible_distribution|lower == "ubuntu"
|
||||
- podman_version_ubuntu | default('unstable') == 'unstable'
|
||||
|
||||
- name: Install repo for ubuntu
|
||||
become: true
|
||||
shell: |
|
||||
|
@ -6,4 +17,6 @@
|
|||
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
|
||||
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | apt-key add -
|
||||
apt-get update
|
||||
when: ansible_distribution|lower == "ubuntu"
|
||||
when:
|
||||
- ansible_distribution|lower == "ubuntu"
|
||||
- podman_version_ubuntu | default('unstable') == 'stable'
|
||||
|
|
|
@ -36,10 +36,8 @@
|
|||
- distro == 'CentOS7'
|
||||
- setup_python|default(true)|bool
|
||||
|
||||
- name: Upgrade pip
|
||||
pip:
|
||||
name: pip
|
||||
extra_args: --upgrade
|
||||
- name: Install Python packaging
|
||||
command: pip install --upgrade setuptools packaging pip
|
||||
environment:
|
||||
PATH: /usr/local/bin:{{ ansible_env.PATH }}
|
||||
|
||||
|
@ -62,6 +60,41 @@
|
|||
- git
|
||||
- vim
|
||||
- dnsmasq
|
||||
- slirp4netns
|
||||
state: latest
|
||||
|
||||
- name: Discover slirp4netns version
|
||||
shell: slirp4netns -v | grep version | awk {'print $3'}
|
||||
register: version
|
||||
when:
|
||||
- ansible_distribution == 'Ubuntu'
|
||||
- ansible_distribution_major_version is version('22', '>=')
|
||||
|
||||
- name: Install newest slirp4netns version
|
||||
shell: >-
|
||||
curl -o /tmp/slirp4netns --fail -L https://github.com/rootless-containers/slirp4netns/releases/download/v1.2.0/slirp4netns-$(uname -m);
|
||||
chmod +x /tmp/slirp4netns;
|
||||
mv /tmp/slirp4netns /usr/bin/slirp4netns
|
||||
when:
|
||||
- ansible_distribution == 'Ubuntu'
|
||||
- ansible_distribution_major_version is version('22', '>=')
|
||||
- version.stdout is version('1.1.0', '<')
|
||||
|
||||
- name: Discover conmon version
|
||||
shell: conmon --version | grep version | awk {'print $3'}
|
||||
register: conmon_version
|
||||
when:
|
||||
- ansible_distribution == 'Ubuntu'
|
||||
- ansible_distribution_major_version is version('22', '>=')
|
||||
|
||||
- name: Downgrade broken conmon
|
||||
shell: >-
|
||||
wget https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_22.04/amd64/conmon_2.1.2~0_amd64.deb -O /tmp/conmon_2.1.2.deb;
|
||||
apt install -y /tmp/conmon_2.1.2.deb
|
||||
when:
|
||||
- ansible_distribution == 'Ubuntu'
|
||||
- ansible_distribution_major_version is version('22', '>=')
|
||||
- conmon_version.stdout is version('2.1.9', '==')
|
||||
|
||||
- name: Remove virtualenv if need
|
||||
file:
|
||||
|
|
|
@ -2,17 +2,26 @@
|
|||
set -o pipefail
|
||||
set -eux
|
||||
|
||||
# New requirement from ansible-core 2.14
|
||||
export LC_ALL=en_US.UTF-8
|
||||
export LANG=en_US.UTF-8
|
||||
export LANGUAGE=en_US.UTF-8
|
||||
|
||||
CON_TYPE="${1:-podman}"
|
||||
SUDO=${ROOT:+"sudo -E"}
|
||||
PODMAN_EXE="${2:-podman}"
|
||||
|
||||
echo "Print current Podman version"
|
||||
$PODMAN_EXE version
|
||||
|
||||
ANSIBLECMD=${ANSIBLECMD:-$(command -v ansible-playbook)}
|
||||
echo "Testing $CON_TYPE connection ${ROOT:+'with root'}"
|
||||
|
||||
if [[ "$CON_TYPE" == "podman" ]]; then
|
||||
${SUDO} podman ps | grep -q "${CON_TYPE}-container" || \
|
||||
${SUDO} podman run -d --name "${CON_TYPE}-container" python:3-alpine sleep 1d
|
||||
${SUDO} $PODMAN_EXE ps | grep -q "${CON_TYPE}-container" || \
|
||||
${SUDO} $PODMAN_EXE run -d --name "${CON_TYPE}-container" python:3.10-alpine sleep 1d
|
||||
elif [[ "$CON_TYPE" == "buildah" ]]; then
|
||||
${SUDO} buildah from --name=buildah-container python:2
|
||||
${SUDO} buildah from --name=buildah-container python:3.10-alpine
|
||||
fi
|
||||
|
||||
pushd "tests/integration/targets/connection_${CON_TYPE}"
|
||||
|
@ -26,6 +35,7 @@ exit_code=0
|
|||
CMD="${SUDO:-} ${ANSIBLECMD:-ansible-playbook} \
|
||||
-i tests/integration/targets/connection_${CON_TYPE}/test_connection.inventory \
|
||||
-e connection_type=containers.podman.${CON_TYPE} \
|
||||
-e ansible_podman_executable=$PODMAN_EXE \
|
||||
ci/playbooks/connections/test.yml"
|
||||
$CMD -vv || exit_code=$?
|
||||
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
set -o pipefail
|
||||
set -ex
|
||||
|
||||
# New requirement from ansible-core 2.14
|
||||
export LC_ALL=en_US.UTF-8
|
||||
export LANG=en_US.UTF-8
|
||||
export LANGUAGE=en_US.UTF-8
|
||||
|
||||
[[ -z "$TEST2RUN" || ! -f "ci/playbooks/containers/${TEST2RUN}.yml" ]] && {
|
||||
echo "Please specify test to run, for example TEST2RUN=podman_container";
|
||||
exit 1;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1,123 @@
|
|||
/* Compatability shim for jQuery and underscores.js.
|
||||
*
|
||||
* Copyright Sphinx contributors
|
||||
* Released under the two clause BSD licence
|
||||
*/
|
||||
|
||||
/**
|
||||
* small helper function to urldecode strings
|
||||
*
|
||||
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
|
||||
*/
|
||||
jQuery.urldecode = function(x) {
|
||||
if (!x) {
|
||||
return x
|
||||
}
|
||||
return decodeURIComponent(x.replace(/\+/g, ' '));
|
||||
};
|
||||
|
||||
/**
|
||||
* small helper function to urlencode strings
|
||||
*/
|
||||
jQuery.urlencode = encodeURIComponent;
|
||||
|
||||
/**
|
||||
* This function returns the parsed url parameters of the
|
||||
* current request. Multiple values per key are supported,
|
||||
* it will always return arrays of strings for the value parts.
|
||||
*/
|
||||
jQuery.getQueryParameters = function(s) {
|
||||
if (typeof s === 'undefined')
|
||||
s = document.location.search;
|
||||
var parts = s.substr(s.indexOf('?') + 1).split('&');
|
||||
var result = {};
|
||||
for (var i = 0; i < parts.length; i++) {
|
||||
var tmp = parts[i].split('=', 2);
|
||||
var key = jQuery.urldecode(tmp[0]);
|
||||
var value = jQuery.urldecode(tmp[1]);
|
||||
if (key in result)
|
||||
result[key].push(value);
|
||||
else
|
||||
result[key] = [value];
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* highlight a given string on a jquery object by wrapping it in
|
||||
* span elements with the given class name.
|
||||
*/
|
||||
jQuery.fn.highlightText = function(text, className) {
|
||||
function highlight(node, addItems) {
|
||||
if (node.nodeType === 3) {
|
||||
var val = node.nodeValue;
|
||||
var pos = val.toLowerCase().indexOf(text);
|
||||
if (pos >= 0 &&
|
||||
!jQuery(node.parentNode).hasClass(className) &&
|
||||
!jQuery(node.parentNode).hasClass("nohighlight")) {
|
||||
var span;
|
||||
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
|
||||
if (isInSVG) {
|
||||
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
||||
} else {
|
||||
span = document.createElement("span");
|
||||
span.className = className;
|
||||
}
|
||||
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
|
||||
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
|
||||
document.createTextNode(val.substr(pos + text.length)),
|
||||
node.nextSibling));
|
||||
node.nodeValue = val.substr(0, pos);
|
||||
if (isInSVG) {
|
||||
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
||||
var bbox = node.parentElement.getBBox();
|
||||
rect.x.baseVal.value = bbox.x;
|
||||
rect.y.baseVal.value = bbox.y;
|
||||
rect.width.baseVal.value = bbox.width;
|
||||
rect.height.baseVal.value = bbox.height;
|
||||
rect.setAttribute('class', className);
|
||||
addItems.push({
|
||||
"parent": node.parentNode,
|
||||
"target": rect});
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!jQuery(node).is("button, select, textarea")) {
|
||||
jQuery.each(node.childNodes, function() {
|
||||
highlight(this, addItems);
|
||||
});
|
||||
}
|
||||
}
|
||||
var addItems = [];
|
||||
var result = this.each(function() {
|
||||
highlight(this, addItems);
|
||||
});
|
||||
for (var i = 0; i < addItems.length; ++i) {
|
||||
jQuery(addItems[i].parent).before(addItems[i].target);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/*
|
||||
* backward compatibility for jQuery.browser
|
||||
* This will be supported until firefox bug is fixed.
|
||||
*/
|
||||
if (!jQuery.browser) {
|
||||
jQuery.uaMatch = function(ua) {
|
||||
ua = ua.toLowerCase();
|
||||
|
||||
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(msie) ([\w.]+)/.exec(ua) ||
|
||||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
|
||||
[];
|
||||
|
||||
return {
|
||||
browser: match[ 1 ] || "",
|
||||
version: match[ 2 ] || "0"
|
||||
};
|
||||
};
|
||||
jQuery.browser = {};
|
||||
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
|
||||
}
|
|
@ -419,7 +419,9 @@ table.footnote td {
|
|||
}
|
||||
|
||||
dl {
|
||||
margin: 0;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
margin-top: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,12 +1,5 @@
|
|||
/*
|
||||
* basic.css
|
||||
* ~~~~~~~~~
|
||||
*
|
||||
* Sphinx stylesheet -- basic theme.
|
||||
*
|
||||
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
/* -- main layout ----------------------------------------------------------- */
|
||||
|
@ -115,22 +108,18 @@ img {
|
|||
/* -- search page ----------------------------------------------------------- */
|
||||
|
||||
ul.search {
|
||||
margin: 10px 0 0 20px;
|
||||
padding: 0;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
ul.search li {
|
||||
padding: 5px 0 5px 20px;
|
||||
background-image: url(file.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 0 7px;
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
ul.search li a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
ul.search li div.context {
|
||||
ul.search li p.context {
|
||||
color: #888;
|
||||
margin: 2px 0 0 30px;
|
||||
text-align: left;
|
||||
|
@ -222,7 +211,7 @@ table.modindextable td {
|
|||
/* -- general body styles --------------------------------------------------- */
|
||||
|
||||
div.body {
|
||||
min-width: 450px;
|
||||
min-width: 360px;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
|
@ -237,14 +226,8 @@ a.headerlink {
|
|||
visibility: hidden;
|
||||
}
|
||||
|
||||
a.brackets:before,
|
||||
span.brackets > a:before{
|
||||
content: "[";
|
||||
}
|
||||
|
||||
a.brackets:after,
|
||||
span.brackets > a:after {
|
||||
content: "]";
|
||||
a:visited {
|
||||
color: #551A8B;
|
||||
}
|
||||
|
||||
h1:hover > a.headerlink,
|
||||
|
@ -277,25 +260,25 @@ p.rubric {
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
img.align-left, .figure.align-left, object.align-left {
|
||||
img.align-left, figure.align-left, .figure.align-left, object.align-left {
|
||||
clear: left;
|
||||
float: left;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
img.align-right, .figure.align-right, object.align-right {
|
||||
img.align-right, figure.align-right, .figure.align-right, object.align-right {
|
||||
clear: right;
|
||||
float: right;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
img.align-center, .figure.align-center, object.align-center {
|
||||
img.align-center, figure.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
img.align-default, .figure.align-default {
|
||||
img.align-default, figure.align-default, .figure.align-default {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
@ -319,7 +302,8 @@ img.align-default, .figure.align-default {
|
|||
|
||||
/* -- sidebars -------------------------------------------------------------- */
|
||||
|
||||
div.sidebar {
|
||||
div.sidebar,
|
||||
aside.sidebar {
|
||||
margin: 0 0 0.5em 1em;
|
||||
border: 1px solid #ddb;
|
||||
padding: 7px;
|
||||
|
@ -334,12 +318,16 @@ p.sidebar-title {
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
nav.contents,
|
||||
aside.topic,
|
||||
div.admonition, div.topic, blockquote {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
/* -- topics ---------------------------------------------------------------- */
|
||||
|
||||
nav.contents,
|
||||
aside.topic,
|
||||
div.topic {
|
||||
border: 1px solid #ccc;
|
||||
padding: 7px;
|
||||
|
@ -377,12 +365,18 @@ div.body p.centered {
|
|||
/* -- content of sidebars/topics/admonitions -------------------------------- */
|
||||
|
||||
div.sidebar > :last-child,
|
||||
aside.sidebar > :last-child,
|
||||
nav.contents > :last-child,
|
||||
aside.topic > :last-child,
|
||||
div.topic > :last-child,
|
||||
div.admonition > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
div.sidebar::after,
|
||||
aside.sidebar::after,
|
||||
nav.contents::after,
|
||||
aside.topic::after,
|
||||
div.topic::after,
|
||||
div.admonition::after,
|
||||
blockquote::after {
|
||||
|
@ -425,10 +419,6 @@ table.docutils td, table.docutils th {
|
|||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
table.footnote td, table.footnote th {
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: left;
|
||||
padding-right: 5px;
|
||||
|
@ -455,20 +445,22 @@ td > :last-child {
|
|||
|
||||
/* -- figures --------------------------------------------------------------- */
|
||||
|
||||
div.figure {
|
||||
div.figure, figure {
|
||||
margin: 0.5em;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.figure p.caption {
|
||||
div.figure p.caption, figcaption {
|
||||
padding: 0.3em;
|
||||
}
|
||||
|
||||
div.figure p.caption span.caption-number {
|
||||
div.figure p.caption span.caption-number,
|
||||
figcaption span.caption-number {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
div.figure p.caption span.caption-text {
|
||||
div.figure p.caption span.caption-text,
|
||||
figcaption span.caption-text {
|
||||
}
|
||||
|
||||
/* -- field list styles ----------------------------------------------------- */
|
||||
|
@ -503,6 +495,63 @@ table.hlist td {
|
|||
vertical-align: top;
|
||||
}
|
||||
|
||||
/* -- object description styles --------------------------------------------- */
|
||||
|
||||
.sig {
|
||||
font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
|
||||
}
|
||||
|
||||
.sig-name, code.descname {
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sig-name {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
code.descname {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.sig-prename, code.descclassname {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.optional {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
.sig-paren {
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
.sig-param.n {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* C++ specific styling */
|
||||
|
||||
.sig-inline.c-texpr,
|
||||
.sig-inline.cpp-texpr {
|
||||
font-family: unset;
|
||||
}
|
||||
|
||||
.sig.c .k, .sig.c .kt,
|
||||
.sig.cpp .k, .sig.cpp .kt {
|
||||
color: #0033B3;
|
||||
}
|
||||
|
||||
.sig.c .m,
|
||||
.sig.cpp .m {
|
||||
color: #1750EB;
|
||||
}
|
||||
|
||||
.sig.c .s, .sig.c .sc,
|
||||
.sig.cpp .s, .sig.cpp .sc {
|
||||
color: #067D17;
|
||||
}
|
||||
|
||||
|
||||
/* -- other body styles ----------------------------------------------------- */
|
||||
|
||||
|
@ -553,19 +602,26 @@ ul.simple p {
|
|||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dl.footnote > dt,
|
||||
dl.citation > dt {
|
||||
aside.footnote > span,
|
||||
div.citation > span {
|
||||
float: left;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
dl.footnote > dd,
|
||||
dl.citation > dd {
|
||||
aside.footnote > span:last-of-type,
|
||||
div.citation > span:last-of-type {
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
aside.footnote > p {
|
||||
margin-left: 2em;
|
||||
}
|
||||
div.citation > p {
|
||||
margin-left: 4em;
|
||||
}
|
||||
aside.footnote > p:last-of-type,
|
||||
div.citation > p:last-of-type {
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
|
||||
dl.footnote > dd:after,
|
||||
dl.citation > dd:after {
|
||||
aside.footnote > p:last-of-type:after,
|
||||
div.citation > p:last-of-type:after {
|
||||
content: "";
|
||||
clear: both;
|
||||
}
|
||||
|
@ -582,10 +638,6 @@ dl.field-list > dt {
|
|||
padding-right: 5px;
|
||||
}
|
||||
|
||||
dl.field-list > dt:after {
|
||||
content: ":";
|
||||
}
|
||||
|
||||
dl.field-list > dd {
|
||||
padding-left: 0.5em;
|
||||
margin-top: 0em;
|
||||
|
@ -611,6 +663,16 @@ dd {
|
|||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.sig dd {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.sig dl {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
dl > dd:last-child,
|
||||
dl > dd:last-child > :last-child {
|
||||
margin-bottom: 0;
|
||||
|
@ -629,14 +691,6 @@ dl.glossary dt {
|
|||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.optional {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
.sig-paren {
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
.versionmodified {
|
||||
font-style: italic;
|
||||
}
|
||||
|
@ -677,8 +731,9 @@ dl.glossary dt {
|
|||
|
||||
.classifier:before {
|
||||
font-style: normal;
|
||||
margin: 0.5em;
|
||||
margin: 0 0.5em;
|
||||
content: ":";
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
abbr, acronym {
|
||||
|
@ -702,6 +757,7 @@ span.pre {
|
|||
-ms-hyphens: none;
|
||||
-webkit-hyphens: none;
|
||||
hyphens: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div[class*="highlight-"] {
|
||||
|
@ -765,8 +821,12 @@ div.code-block-caption code {
|
|||
|
||||
table.highlighttable td.linenos,
|
||||
span.linenos,
|
||||
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
|
||||
user-select: none;
|
||||
div.highlight span.gp { /* gp: Generic.Prompt */
|
||||
user-select: none;
|
||||
-webkit-user-select: text; /* Safari fallback only */
|
||||
-webkit-user-select: none; /* Chrome/Safari */
|
||||
-moz-user-select: none; /* Firefox */
|
||||
-ms-user-select: none; /* IE10+ */
|
||||
}
|
||||
|
||||
div.code-block-caption span.caption-number {
|
||||
|
@ -781,16 +841,6 @@ div.literal-block-wrapper {
|
|||
margin: 1em 0;
|
||||
}
|
||||
|
||||
code.descname {
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
code.descclassname {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
code.xref, a code {
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
|
|
|
@ -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; }
|
|
@ -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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,4 @@
|
|||
.ethical-sidebar,
|
||||
.ethical-footer {
|
||||
border-radius: 0 !important;
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -1,316 +1,149 @@
|
|||
/*
|
||||
* doctools.js
|
||||
* ~~~~~~~~~~~
|
||||
*
|
||||
* Sphinx JavaScript utilities for all documentation.
|
||||
*
|
||||
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
* Base JavaScript utilities for all Sphinx HTML documentation.
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* select a different prefix for underscore
|
||||
*/
|
||||
$u = _.noConflict();
|
||||
const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
|
||||
"TEXTAREA",
|
||||
"INPUT",
|
||||
"SELECT",
|
||||
"BUTTON",
|
||||
]);
|
||||
|
||||
/**
|
||||
* make the code below compatible with browsers without
|
||||
* an installed firebug like debugger
|
||||
if (!window.console || !console.firebug) {
|
||||
var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
|
||||
"dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
|
||||
"profile", "profileEnd"];
|
||||
window.console = {};
|
||||
for (var i = 0; i < names.length; ++i)
|
||||
window.console[names[i]] = function() {};
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* small helper function to urldecode strings
|
||||
*/
|
||||
jQuery.urldecode = function(x) {
|
||||
return decodeURIComponent(x).replace(/\+/g, ' ');
|
||||
};
|
||||
|
||||
/**
|
||||
* small helper function to urlencode strings
|
||||
*/
|
||||
jQuery.urlencode = encodeURIComponent;
|
||||
|
||||
/**
|
||||
* This function returns the parsed url parameters of the
|
||||
* current request. Multiple values per key are supported,
|
||||
* it will always return arrays of strings for the value parts.
|
||||
*/
|
||||
jQuery.getQueryParameters = function(s) {
|
||||
if (typeof s === 'undefined')
|
||||
s = document.location.search;
|
||||
var parts = s.substr(s.indexOf('?') + 1).split('&');
|
||||
var result = {};
|
||||
for (var i = 0; i < parts.length; i++) {
|
||||
var tmp = parts[i].split('=', 2);
|
||||
var key = jQuery.urldecode(tmp[0]);
|
||||
var value = jQuery.urldecode(tmp[1]);
|
||||
if (key in result)
|
||||
result[key].push(value);
|
||||
else
|
||||
result[key] = [value];
|
||||
const _ready = (callback) => {
|
||||
if (document.readyState !== "loading") {
|
||||
callback();
|
||||
} else {
|
||||
document.addEventListener("DOMContentLoaded", callback);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* highlight a given string on a jquery object by wrapping it in
|
||||
* span elements with the given class name.
|
||||
*/
|
||||
jQuery.fn.highlightText = function(text, className) {
|
||||
function highlight(node, addItems) {
|
||||
if (node.nodeType === 3) {
|
||||
var val = node.nodeValue;
|
||||
var pos = val.toLowerCase().indexOf(text);
|
||||
if (pos >= 0 &&
|
||||
!jQuery(node.parentNode).hasClass(className) &&
|
||||
!jQuery(node.parentNode).hasClass("nohighlight")) {
|
||||
var span;
|
||||
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
|
||||
if (isInSVG) {
|
||||
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
||||
} else {
|
||||
span = document.createElement("span");
|
||||
span.className = className;
|
||||
}
|
||||
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
|
||||
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
|
||||
document.createTextNode(val.substr(pos + text.length)),
|
||||
node.nextSibling));
|
||||
node.nodeValue = val.substr(0, pos);
|
||||
if (isInSVG) {
|
||||
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
||||
var bbox = node.parentElement.getBBox();
|
||||
rect.x.baseVal.value = bbox.x;
|
||||
rect.y.baseVal.value = bbox.y;
|
||||
rect.width.baseVal.value = bbox.width;
|
||||
rect.height.baseVal.value = bbox.height;
|
||||
rect.setAttribute('class', className);
|
||||
addItems.push({
|
||||
"parent": node.parentNode,
|
||||
"target": rect});
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!jQuery(node).is("button, select, textarea")) {
|
||||
jQuery.each(node.childNodes, function() {
|
||||
highlight(this, addItems);
|
||||
});
|
||||
}
|
||||
}
|
||||
var addItems = [];
|
||||
var result = this.each(function() {
|
||||
highlight(this, addItems);
|
||||
});
|
||||
for (var i = 0; i < addItems.length; ++i) {
|
||||
jQuery(addItems[i].parent).before(addItems[i].target);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/*
|
||||
* backward compatibility for jQuery.browser
|
||||
* This will be supported until firefox bug is fixed.
|
||||
*/
|
||||
if (!jQuery.browser) {
|
||||
jQuery.uaMatch = function(ua) {
|
||||
ua = ua.toLowerCase();
|
||||
|
||||
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(msie) ([\w.]+)/.exec(ua) ||
|
||||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
|
||||
[];
|
||||
|
||||
return {
|
||||
browser: match[ 1 ] || "",
|
||||
version: match[ 2 ] || "0"
|
||||
};
|
||||
};
|
||||
jQuery.browser = {};
|
||||
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Small JavaScript module for the documentation.
|
||||
*/
|
||||
var Documentation = {
|
||||
|
||||
init : function() {
|
||||
this.fixFirefoxAnchorBug();
|
||||
this.highlightSearchWords();
|
||||
this.initIndexTable();
|
||||
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
|
||||
this.initOnKeyListeners();
|
||||
}
|
||||
const Documentation = {
|
||||
init: () => {
|
||||
Documentation.initDomainIndexTable();
|
||||
Documentation.initOnKeyListeners();
|
||||
},
|
||||
|
||||
/**
|
||||
* i18n support
|
||||
*/
|
||||
TRANSLATIONS : {},
|
||||
PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
|
||||
LOCALE : 'unknown',
|
||||
TRANSLATIONS: {},
|
||||
PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
|
||||
LOCALE: "unknown",
|
||||
|
||||
// gettext and ngettext don't access this so that the functions
|
||||
// can safely bound to a different name (_ = Documentation.gettext)
|
||||
gettext : function(string) {
|
||||
var translated = Documentation.TRANSLATIONS[string];
|
||||
if (typeof translated === 'undefined')
|
||||
return string;
|
||||
return (typeof translated === 'string') ? translated : translated[0];
|
||||
gettext: (string) => {
|
||||
const translated = Documentation.TRANSLATIONS[string];
|
||||
switch (typeof translated) {
|
||||
case "undefined":
|
||||
return string; // no translation
|
||||
case "string":
|
||||
return translated; // translation exists
|
||||
default:
|
||||
return translated[0]; // (singular, plural) translation tuple exists
|
||||
}
|
||||
},
|
||||
|
||||
ngettext : function(singular, plural, n) {
|
||||
var translated = Documentation.TRANSLATIONS[singular];
|
||||
if (typeof translated === 'undefined')
|
||||
return (n == 1) ? singular : plural;
|
||||
return translated[Documentation.PLURALEXPR(n)];
|
||||
ngettext: (singular, plural, n) => {
|
||||
const translated = Documentation.TRANSLATIONS[singular];
|
||||
if (typeof translated !== "undefined")
|
||||
return translated[Documentation.PLURAL_EXPR(n)];
|
||||
return n === 1 ? singular : plural;
|
||||
},
|
||||
|
||||
addTranslations : function(catalog) {
|
||||
for (var key in catalog.messages)
|
||||
this.TRANSLATIONS[key] = catalog.messages[key];
|
||||
this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
|
||||
this.LOCALE = catalog.locale;
|
||||
addTranslations: (catalog) => {
|
||||
Object.assign(Documentation.TRANSLATIONS, catalog.messages);
|
||||
Documentation.PLURAL_EXPR = new Function(
|
||||
"n",
|
||||
`return (${catalog.plural_expr})`
|
||||
);
|
||||
Documentation.LOCALE = catalog.locale;
|
||||
},
|
||||
|
||||
/**
|
||||
* add context elements like header anchor links
|
||||
* helper function to focus on search bar
|
||||
*/
|
||||
addContextElements : function() {
|
||||
$('div[id] > :header:first').each(function() {
|
||||
$('<a class="headerlink">\u00B6</a>').
|
||||
attr('href', '#' + this.id).
|
||||
attr('title', _('Permalink to this headline')).
|
||||
appendTo(this);
|
||||
});
|
||||
$('dt[id]').each(function() {
|
||||
$('<a class="headerlink">\u00B6</a>').
|
||||
attr('href', '#' + this.id).
|
||||
attr('title', _('Permalink to this definition')).
|
||||
appendTo(this);
|
||||
});
|
||||
focusSearchBar: () => {
|
||||
document.querySelectorAll("input[name=q]")[0]?.focus();
|
||||
},
|
||||
|
||||
/**
|
||||
* workaround a firefox stupidity
|
||||
* see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
|
||||
* Initialise the domain index toggle buttons
|
||||
*/
|
||||
fixFirefoxAnchorBug : function() {
|
||||
if (document.location.hash && $.browser.mozilla)
|
||||
window.setTimeout(function() {
|
||||
document.location.href += '';
|
||||
}, 10);
|
||||
},
|
||||
|
||||
/**
|
||||
* highlight the search words provided in the url in the text
|
||||
*/
|
||||
highlightSearchWords : function() {
|
||||
var params = $.getQueryParameters();
|
||||
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
|
||||
if (terms.length) {
|
||||
var body = $('div.body');
|
||||
if (!body.length) {
|
||||
body = $('body');
|
||||
initDomainIndexTable: () => {
|
||||
const toggler = (el) => {
|
||||
const idNumber = el.id.substr(7);
|
||||
const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
|
||||
if (el.src.substr(-9) === "minus.png") {
|
||||
el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
|
||||
toggledRows.forEach((el) => (el.style.display = "none"));
|
||||
} else {
|
||||
el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
|
||||
toggledRows.forEach((el) => (el.style.display = ""));
|
||||
}
|
||||
window.setTimeout(function() {
|
||||
$.each(terms, function() {
|
||||
body.highlightText(this.toLowerCase(), 'highlighted');
|
||||
});
|
||||
}, 10);
|
||||
$('<p class="highlight-link"><a href="javascript:Documentation.' +
|
||||
'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
|
||||
.appendTo($('#searchbox'));
|
||||
}
|
||||
};
|
||||
|
||||
const togglerElements = document.querySelectorAll("img.toggler");
|
||||
togglerElements.forEach((el) =>
|
||||
el.addEventListener("click", (event) => toggler(event.currentTarget))
|
||||
);
|
||||
togglerElements.forEach((el) => (el.style.display = ""));
|
||||
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
|
||||
},
|
||||
|
||||
/**
|
||||
* init the domain index toggle buttons
|
||||
*/
|
||||
initIndexTable : function() {
|
||||
var togglers = $('img.toggler').click(function() {
|
||||
var src = $(this).attr('src');
|
||||
var idnum = $(this).attr('id').substr(7);
|
||||
$('tr.cg-' + idnum).toggle();
|
||||
if (src.substr(-9) === 'minus.png')
|
||||
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
|
||||
else
|
||||
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
|
||||
}).css('display', '');
|
||||
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
|
||||
togglers.click();
|
||||
}
|
||||
},
|
||||
initOnKeyListeners: () => {
|
||||
// only install a listener if it is really needed
|
||||
if (
|
||||
!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
|
||||
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
|
||||
)
|
||||
return;
|
||||
|
||||
/**
|
||||
* helper function to hide the search marks again
|
||||
*/
|
||||
hideSearchWords : function() {
|
||||
$('#searchbox .highlight-link').fadeOut(300);
|
||||
$('span.highlighted').removeClass('highlighted');
|
||||
},
|
||||
document.addEventListener("keydown", (event) => {
|
||||
// bail for input elements
|
||||
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
|
||||
// bail with special keys
|
||||
if (event.altKey || event.ctrlKey || event.metaKey) return;
|
||||
|
||||
/**
|
||||
* make the url absolute
|
||||
*/
|
||||
makeURL : function(relativeURL) {
|
||||
return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
|
||||
},
|
||||
if (!event.shiftKey) {
|
||||
switch (event.key) {
|
||||
case "ArrowLeft":
|
||||
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
|
||||
|
||||
/**
|
||||
* get the current relative url
|
||||
*/
|
||||
getCurrentURL : function() {
|
||||
var path = document.location.pathname;
|
||||
var parts = path.split(/\//);
|
||||
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
|
||||
if (this === '..')
|
||||
parts.pop();
|
||||
});
|
||||
var url = parts.join('/');
|
||||
return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
|
||||
},
|
||||
|
||||
initOnKeyListeners: function() {
|
||||
$(document).keydown(function(event) {
|
||||
var activeElementType = document.activeElement.tagName;
|
||||
// don't navigate when in search box, textarea, dropdown or button
|
||||
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
|
||||
&& activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey
|
||||
&& !event.shiftKey) {
|
||||
switch (event.keyCode) {
|
||||
case 37: // left
|
||||
var prevHref = $('link[rel="prev"]').prop('href');
|
||||
if (prevHref) {
|
||||
window.location.href = prevHref;
|
||||
return false;
|
||||
const prevLink = document.querySelector('link[rel="prev"]');
|
||||
if (prevLink && prevLink.href) {
|
||||
window.location.href = prevLink.href;
|
||||
event.preventDefault();
|
||||
}
|
||||
case 39: // right
|
||||
var nextHref = $('link[rel="next"]').prop('href');
|
||||
if (nextHref) {
|
||||
window.location.href = nextHref;
|
||||
return false;
|
||||
break;
|
||||
case "ArrowRight":
|
||||
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
|
||||
|
||||
const nextLink = document.querySelector('link[rel="next"]');
|
||||
if (nextLink && nextLink.href) {
|
||||
window.location.href = nextLink.href;
|
||||
event.preventDefault();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// some keyboard layouts may need Shift to get /
|
||||
switch (event.key) {
|
||||
case "/":
|
||||
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
|
||||
Documentation.focusSearchBar();
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
// quick alias for translations
|
||||
_ = Documentation.gettext;
|
||||
const _ = Documentation.gettext;
|
||||
|
||||
$(document).ready(function() {
|
||||
Documentation.init();
|
||||
});
|
||||
_ready(Documentation.init);
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
||||
const DOCUMENTATION_OPTIONS = {
|
||||
VERSION: '',
|
||||
LANGUAGE: 'None',
|
||||
LANGUAGE: 'en',
|
||||
COLLAPSE_INDEX: false,
|
||||
BUILDER: 'html',
|
||||
FILE_SUFFIX: '.html',
|
||||
LINK_SUFFIX: '.html',
|
||||
HAS_SOURCE: true,
|
||||
HAS_SOURCE: false,
|
||||
SOURCELINK_SUFFIX: '.txt',
|
||||
NAVIGATION_WITH_KEYS: false
|
||||
NAVIGATION_WITH_KEYS: false,
|
||||
SHOW_SEARCH_SUMMARY: true,
|
||||
ENABLE_SEARCH_SHORTCUTS: true,
|
||||
};
|
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue