Compare commits

..

No commits in common. "main" and "1.9.2" have entirely different histories.
main ... 1.9.2

359 changed files with 16380 additions and 57789 deletions

3
.github/FUNDING.yml vendored
View File

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

89
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,89 @@
<!--
---------------------------------------------------
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.):**

View File

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

View File

@ -1,50 +0,0 @@
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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,11 +10,10 @@ 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:
- main
- master
pull_request:
paths:
- '.github/workflows/podman_container.yml'
@ -24,7 +23,6 @@ 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:
@ -33,8 +31,8 @@ on:
jobs:
test_podman_container:
name: Podman container ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-22.04' }}-${{ matrix.podman-version || 'unstable' }}
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
name: Podman container ${{ matrix.ansible-version }}-${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
defaults:
run:
shell: bash
@ -42,36 +40,22 @@ jobs:
fail-fast: false
matrix:
ansible-version:
- git+https://github.com/ansible/ansible.git@stable-2.18
- 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-22.04
- ubuntu-20.04
python-version:
- "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
- 3.9
steps:
- name: Check out repository
uses: actions/checkout@v5
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
@ -84,7 +68,7 @@ jobs:
pip --version
- name: Set up pip cache
uses: actions/cache@v4
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
@ -110,8 +94,9 @@ jobs:
run: |
export PATH=~/.local/bin:$PATH
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
if [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
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
@ -125,8 +110,90 @@ jobs:
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false \
-e podman_version_ubuntu=${{ matrix.podman-version }}
-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
TEST2RUN=podman_container ./ci/run_containers_tests.sh
shell: bash

View File

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

View File

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

View File

@ -12,7 +12,7 @@ on:
- 'plugins/module_utils/podman/common.py'
- 'tests/integration/targets/podman_container_idempotency/**'
branches:
- main
- master
pull_request:
paths:
- '.github/workflows/podman_container_idem.yml'
@ -27,8 +27,96 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_container_idem:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_container_idempotency'
display_name: 'Idempotency'
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

View File

@ -4,7 +4,6 @@ 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'
@ -14,11 +13,10 @@ on:
- 'plugins/modules/podman_container_info.py'
- 'tests/integration/targets/podman_container_info/**'
branches:
- main
- master
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'
@ -31,8 +29,86 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_container_info:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_container_info'
display_name: '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

View File

@ -4,7 +4,6 @@ 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'
@ -14,14 +13,13 @@ on:
- 'plugins/modules/podman_containers.py'
- 'tests/integration/targets/podman_containers/**'
branches:
- main
- master
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_containers.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'
@ -31,8 +29,88 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_containers:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_containers'
display_name: 'Podman multi-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

View File

@ -4,18 +4,16 @@ 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:
- main
- master
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'
@ -25,8 +23,86 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_export:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_export'
display_name: '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

View File

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

View File

@ -4,36 +4,107 @@ 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:
- main
- master
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:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_image'
display_name: 'Podman image'
extra_collections: 'ansible.posix'
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

View File

@ -4,34 +4,107 @@ 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:
- main
- master
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:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_image_info'
display_name: 'Podman image info'
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
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and display Python and PIP versions
run: |
sudo apt-get update
sudo apt-get install -y python*-wheel python*-yaml
python -m pip install --upgrade pip
python -V
pip --version
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-units-VMs
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: python3 -m pip install --user --force-reinstall --upgrade '${{ matrix.ansible-version }}'
- name: Build and install the collection tarball
run: |
rm -rf /tmp/just_new_collection
~/.local/bin/ansible-galaxy collection build --output-path /tmp/just_new_collection --force
~/.local/bin/ansible-galaxy collection install -vvv --force /tmp/just_new_collection/*.tar.gz
- name: Run collection tests for podman image info
run: |
export PATH=~/.local/bin:$PATH
echo "Run ansible version"
command -v ansible
ansible --version
if [[ '${{ matrix.ansible-version }}' == 'git+https://github.com/ansible/ansible.git@devel' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-dev.cfg
elif [[ '${{ matrix.ansible-version }}' == 'ansible<2.10' ]]; then
export ANSIBLE_CONFIG=$(pwd)/ci/ansible-2.9.cfg
fi
echo $ANSIBLE_CONFIG
command -v ansible-playbook
pip --version
python --version
ansible-playbook --version
ansible-playbook -vv ci/playbooks/pre.yml \
-e host=localhost \
-i localhost, \
-e ansible_connection=local \
-e setup_python=false
TEST2RUN=podman_image_info ./ci/run_containers_tests.sh
shell: bash

View File

@ -4,18 +4,16 @@ 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:
- main
- master
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'
@ -25,8 +23,86 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_import:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_import'
display_name: '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

View File

@ -4,18 +4,16 @@ 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:
- main
- master
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'
@ -25,8 +23,86 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_load:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_load'
display_name: '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

View File

@ -4,18 +4,16 @@ 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:
- main
- master
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'
@ -25,8 +23,86 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_login:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_login'
display_name: '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

View File

@ -4,18 +4,16 @@ 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:
- main
- master
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'
@ -25,8 +23,86 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_login_info:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_login_info'
display_name: '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

View File

@ -4,18 +4,16 @@ 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:
- main
- master
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'
@ -25,8 +23,86 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_logout:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_logout'
display_name: '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

View File

@ -4,31 +4,105 @@ 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:
- main
- master
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:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_network'
display_name: '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

View File

@ -4,18 +4,16 @@ 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:
- main
- master
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'
@ -25,8 +23,86 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_network_info:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_network_info'
display_name: '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

View File

@ -8,10 +8,9 @@ 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:
- main
- master
pull_request:
paths:
- '.github/workflows/podman_play.yml'
@ -19,14 +18,92 @@ 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:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_play'
display_name: '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

View File

@ -8,13 +8,11 @@ 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:
- main
- master
pull_request:
paths:
- '.github/workflows/podman_pod.yml'
@ -22,8 +20,6 @@ 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/**'
@ -31,8 +27,87 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_pod:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_pod'
display_name: '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

View File

@ -12,7 +12,7 @@ on:
- 'plugins/modules/podman_pod_info.py'
- 'tests/integration/targets/podman_pod_info/**'
branches:
- main
- master
pull_request:
paths:
- '.github/workflows/podman_pod_info.yml'
@ -27,8 +27,87 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_pod_info:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_pod_info'
display_name: '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

View File

@ -1,32 +0,0 @@
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'

View File

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

View File

@ -4,18 +4,16 @@ 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:
- main
- master
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'
@ -25,8 +23,86 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_save:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_save'
display_name: '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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,18 +4,16 @@ 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:
- main
- master
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'
@ -25,8 +23,86 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_tag:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_tag'
display_name: '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

View File

@ -4,31 +4,105 @@ 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:
- main
- master
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:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_volume'
display_name: '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

View File

@ -4,7 +4,6 @@ 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'
@ -12,11 +11,10 @@ on:
- 'plugins/modules/podman_volume.py'
- 'tests/integration/targets/podman_volume_info/**'
branches:
- main
- master
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'
@ -27,8 +25,86 @@ on:
- cron: 4 0 * * * # Run daily at 0:03 UTC
jobs:
test_podman_volume_info:
uses: ./.github/workflows/reusable-module-test.yml
with:
module_name: 'podman_volume_info'
display_name: '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

View File

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

View File

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

View File

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

View File

@ -5,580 +5,6 @@ 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
======
@ -689,7 +115,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 strings in prefixes
- Support empty stings in prefixes
- Update error message when pull set to false
v1.8.1

View File

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

View File

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

204
README.md
View File

@ -1,117 +1,113 @@
<!-- omit in toc -->
[![GitHub Actions CI/CD build status — Collection test suite](https://github.com/containers/ansible-podman-collections/workflows/Collection%20build%20and%20tests/badge.svg?branch=master)](https://github.com/containers/ansible-podman-collections/actions?query=workflow%3A%22Collection%20build%20and%20tests)
# Ansible Collection: containers.podman
[![CI/CD Status](https://img.shields.io/github/actions/workflow/status/containers/ansible-podman-collections/.github/workflows/collection-continuous-integration.yml?branch=main&style=for-the-badge&label=CI%2FCD)](https://github.com/containers/ansible-podman-collections/actions/workflows/collection-continuous-integration.yml)
[![Ansible Galaxy](https://img.shields.io/ansible/collection/d/containers/podman?style=for-the-badge&label=Ansible%20Galaxy)](https://galaxy.ansible.com/containers/podman)
[![License](https://img.shields.io/github/license/containers/ansible-podman-collections?style=for-the-badge)](COPYING)
This repo hosts the `containers.podman` Ansible Collection.
**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.
The collection includes the Podman container plugins to help the build and management of Podman containers.
## Documentation
- **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/).
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
```
## Contributing
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.
We are accepting Github pull requests and issues.
There are many ways in which you can participate in the project, for example:
Please read our **[Contributing Guide](CONTRIBUTING.md)** to learn how to get started with development, testing, and submitting pull requests.
- 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.
## License
This collection is licensed under the [GNU General Public License v3.0 or later](COPYING).
GPL-3.0-or-later

View File

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

View File

@ -107,348 +107,6 @@ 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:
@ -677,7 +335,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 strings in prefixes
- Support empty stings in prefixes
- Update error message when pull set to false
release_summary: Fixes for various modules
release_date: '2021-11-09'
@ -732,36 +390,3 @@ releases:
- Add requires option to podman_container module
release_summary: Bugfixes and new requires option for podman_container
release_date: '2022-03-21'
1.9.3:
changes:
bugfixes:
- Remove idempotency for log level
minor_changes:
- Fix sanity issues with a new Ansible version
release_summary: Bugfixes and minor changes
release_date: '2022-03-29'
1.9.4:
changes:
bugfixes:
- connection_podman - Add missing docstring for method that executes the podman
commands
- podman_container - Change IpcMode default to shareable
- podman_container - Disable memory idempotency
- podman_container - Fix typo in the documentation
- podman_image - Update `podman_image` to remove image with image id
- podman_load - Loop over image names when multiple images present in archive
- podman_login - Fix idempotency for podman_login
- podman_network - Allow specify podman_network options MTU and VLAN separately
- podman_network - Fix internal networks idempotency
- podman_play - Fix play_kube not working when yaml not installed on target
- podman_play - Pass errors as a string instead of list
- podman_pod - Change network attribute from str to list in pods
- podman_pod - Fix pod network idempotency
- podman_pod - Fix pod tests in CI
- podman_pod - Fix pods list retrieve
minor_changes:
- Remove distutils as deprecated
- Run CI on Ubuntu 22.04
- Use 2.13 Ansible version in CI jobs instead of 2.11
release_summary: Bugfixes and minor changes
release_date: '2022-07-04'

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,15 +1,4 @@
---
- 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: |
@ -17,6 +6,4 @@
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"
- podman_version_ubuntu | default('unstable') == 'stable'
when: ansible_distribution|lower == "ubuntu"

View File

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

View File

@ -2,26 +2,17 @@
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_EXE ps | grep -q "${CON_TYPE}-container" || \
${SUDO} $PODMAN_EXE run -d --name "${CON_TYPE}-container" python:3.10-alpine sleep 1d
${SUDO} podman ps | grep -q "${CON_TYPE}-container" || \
${SUDO} podman run -d --name "${CON_TYPE}-container" python:3-alpine sleep 1d
elif [[ "$CON_TYPE" == "buildah" ]]; then
${SUDO} buildah from --name=buildah-container python:3.10-alpine
${SUDO} buildah from --name=buildah-container python:2
fi
pushd "tests/integration/targets/connection_${CON_TYPE}"
@ -35,7 +26,6 @@ exit_code=0
CMD="${SUDO:-} ${ANSIBLECMD:-ansible-playbook} \
-i tests/integration/targets/connection_${CON_TYPE}/test_connection.inventory \
-e connection_type=containers.podman.${CON_TYPE} \
-e ansible_podman_executable=$PODMAN_EXE \
ci/playbooks/connections/test.yml"
$CMD -vv || exit_code=$?

View File

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

View File

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

View File

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

View File

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

View File

@ -1,9 +1,9 @@
#!/usr/bin/bash
DOCS=${1:-$HOME/podman-docs}
COLL_DIR="/tmp/docs_new_path/ansible_collections/containers/podman"
DOCS_TMP="${COLL_DIR}/tmpdocs"
HTML="${DOCS_TMP}/build/html"
HTML=${2:-/tmp/html}
DOCS_TMP=${3:-/tmp/docs}
# Build current collection
rm -rf /tmp/docs_new_collection
@ -15,15 +15,11 @@ pushd /tmp/docs_new_path/ansible_collections/containers/podman
mkdir -p $DOCS_TMP
chmod g-w $DOCS_TMP
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
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
rm -rf "$HTML/_sources" "$HTML/.buildinfo" "$HTML/.doctrees"
popd
cp -r $HTML/* $DOCS/
popd
popd

View File

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

View File

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

File diff suppressed because one or more lines are too long

190
docs/_static/basic.css vendored
View File

@ -1,5 +1,12 @@
/*
* basic.css
* ~~~~~~~~~
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/* -- main layout ----------------------------------------------------------- */
@ -108,18 +115,22 @@ img {
/* -- search page ----------------------------------------------------------- */
ul.search {
margin-top: 10px;
margin: 10px 0 0 20px;
padding: 0;
}
ul.search li {
padding: 5px 0;
padding: 5px 0 5px 20px;
background-image: url(file.png);
background-repeat: no-repeat;
background-position: 0 7px;
}
ul.search li a {
font-weight: bold;
}
ul.search li p.context {
ul.search li div.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
@ -211,7 +222,7 @@ table.modindextable td {
/* -- general body styles --------------------------------------------------- */
div.body {
min-width: 360px;
min-width: 450px;
max-width: 800px;
}
@ -226,8 +237,14 @@ a.headerlink {
visibility: hidden;
}
a:visited {
color: #551A8B;
a.brackets:before,
span.brackets > a:before{
content: "[";
}
a.brackets:after,
span.brackets > a:after {
content: "]";
}
h1:hover > a.headerlink,
@ -260,25 +277,25 @@ p.rubric {
font-weight: bold;
}
img.align-left, figure.align-left, .figure.align-left, object.align-left {
img.align-left, .figure.align-left, object.align-left {
clear: left;
float: left;
margin-right: 1em;
}
img.align-right, figure.align-right, .figure.align-right, object.align-right {
img.align-right, .figure.align-right, object.align-right {
clear: right;
float: right;
margin-left: 1em;
}
img.align-center, figure.align-center, .figure.align-center, object.align-center {
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
img.align-default, figure.align-default, .figure.align-default {
img.align-default, .figure.align-default {
display: block;
margin-left: auto;
margin-right: auto;
@ -302,8 +319,7 @@ img.align-default, figure.align-default, .figure.align-default {
/* -- sidebars -------------------------------------------------------------- */
div.sidebar,
aside.sidebar {
div.sidebar {
margin: 0 0 0.5em 1em;
border: 1px solid #ddb;
padding: 7px;
@ -318,16 +334,12 @@ 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;
@ -365,18 +377,12 @@ 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 {
@ -419,6 +425,10 @@ 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;
@ -445,22 +455,20 @@ td > :last-child {
/* -- figures --------------------------------------------------------------- */
div.figure, figure {
div.figure {
margin: 0.5em;
padding: 0.5em;
}
div.figure p.caption, figcaption {
div.figure p.caption {
padding: 0.3em;
}
div.figure p.caption span.caption-number,
figcaption span.caption-number {
div.figure p.caption span.caption-number {
font-style: italic;
}
div.figure p.caption span.caption-text,
figcaption span.caption-text {
div.figure p.caption span.caption-text {
}
/* -- field list styles ----------------------------------------------------- */
@ -495,63 +503,6 @@ 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 ----------------------------------------------------- */
@ -602,26 +553,19 @@ ul.simple p {
margin-bottom: 0;
}
aside.footnote > span,
div.citation > span {
dl.footnote > dt,
dl.citation > dt {
float: left;
margin-right: 0.5em;
}
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 {
dl.footnote > dd,
dl.citation > dd {
margin-bottom: 0em;
}
aside.footnote > p:last-of-type:after,
div.citation > p:last-of-type:after {
dl.footnote > dd:after,
dl.citation > dd:after {
content: "";
clear: both;
}
@ -638,6 +582,10 @@ dl.field-list > dt {
padding-right: 5px;
}
dl.field-list > dt:after {
content: ":";
}
dl.field-list > dd {
padding-left: 0.5em;
margin-top: 0em;
@ -663,16 +611,6 @@ 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;
@ -691,6 +629,14 @@ dl.glossary dt {
font-size: 1.1em;
}
.optional {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.versionmodified {
font-style: italic;
}
@ -731,9 +677,8 @@ dl.glossary dt {
.classifier:before {
font-style: normal;
margin: 0 0.5em;
margin: 0.5em;
content: ":";
display: inline-block;
}
abbr, acronym {
@ -757,7 +702,6 @@ span.pre {
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
white-space: nowrap;
}
div[class*="highlight-"] {
@ -821,12 +765,8 @@ div.code-block-caption code {
table.highlighttable td.linenos,
span.linenos,
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.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
}
div.code-block-caption span.caption-number {
@ -841,6 +781,16 @@ 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;

View File

@ -1,491 +0,0 @@
@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; }

View File

@ -1 +0,0 @@
.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

Before

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.

View File

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

File diff suppressed because one or more lines are too long

View File

@ -1,149 +1,316 @@
/*
* Base JavaScript utilities for all Sphinx HTML documentation.
* doctools.js
* ~~~~~~~~~~~
*
* Sphinx JavaScript utilities for all documentation.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
"use strict";
const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
"TEXTAREA",
"INPUT",
"SELECT",
"BUTTON",
]);
/**
* select a different prefix for underscore
*/
$u = _.noConflict();
const _ready = (callback) => {
if (document.readyState !== "loading") {
callback();
} else {
document.addEventListener("DOMContentLoaded", callback);
}
/**
* 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];
}
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.
*/
const Documentation = {
init: () => {
Documentation.initDomainIndexTable();
Documentation.initOnKeyListeners();
var Documentation = {
init : function() {
this.fixFirefoxAnchorBug();
this.highlightSearchWords();
this.initIndexTable();
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
this.initOnKeyListeners();
}
},
/**
* i18n support
*/
TRANSLATIONS: {},
PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
LOCALE: "unknown",
TRANSLATIONS : {},
PLURAL_EXPR : function(n) { return 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: (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
gettext : function(string) {
var translated = Documentation.TRANSLATIONS[string];
if (typeof translated === 'undefined')
return string;
return (typeof translated === 'string') ? translated : translated[0];
},
ngettext : function(singular, plural, n) {
var translated = Documentation.TRANSLATIONS[singular];
if (typeof translated === 'undefined')
return (n == 1) ? singular : plural;
return translated[Documentation.PLURALEXPR(n)];
},
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;
},
/**
* add context elements like header anchor links
*/
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);
});
},
/**
* workaround a firefox stupidity
* see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
*/
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');
}
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'));
}
},
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: (catalog) => {
Object.assign(Documentation.TRANSLATIONS, catalog.messages);
Documentation.PLURAL_EXPR = new Function(
"n",
`return (${catalog.plural_expr})`
);
Documentation.LOCALE = catalog.locale;
/**
* 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();
}
},
/**
* helper function to focus on search bar
* helper function to hide the search marks again
*/
focusSearchBar: () => {
document.querySelectorAll("input[name=q]")[0]?.focus();
hideSearchWords : function() {
$('#searchbox .highlight-link').fadeOut(300);
$('span.highlighted').removeClass('highlighted');
},
/**
* Initialise the domain index toggle buttons
* make the url absolute
*/
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 = ""));
}
};
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);
makeURL : function(relativeURL) {
return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
},
initOnKeyListeners: () => {
// only install a listener if it is really needed
if (
!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
)
return;
/**
* 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);
},
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;
if (!event.shiftKey) {
switch (event.key) {
case "ArrowLeft":
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
const prevLink = document.querySelector('link[rel="prev"]');
if (prevLink && prevLink.href) {
window.location.href = prevLink.href;
event.preventDefault();
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;
}
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();
case 39: // right
var nextHref = $('link[rel="next"]').prop('href');
if (nextHref) {
window.location.href = nextHref;
return false;
}
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
const _ = Documentation.gettext;
_ = Documentation.gettext;
_ready(Documentation.init);
$(document).ready(function() {
Documentation.init();
});

View File

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

Binary file not shown.

Binary file not shown.

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