1 Commits
Author SHA1 Message Date
Defame1297 f3cab37c7b feat(pve_vm): add the pve_vm role
Build / build (pull_request) Successful in 46s
Molecule / molecule (pull_request) In progress
Lint / lint (pull_request) Successful in 2m57s
Manage a Proxmox VE QEMU VM through the Proxmox API: clone from a
template, cloud-init user, SSH keys and network, update only on detected
drift, grow the boot disk, apply the power state, wait for SSH and
cloud-init, and delete behind pve_vm_allow_destroy. The role never sets
a cloud-init password and deletes a stored one with no_log.

Inputs are validated first under the always tag: the API credentials,
and pve_vm_disk_size while the disk is managed; the clone asserts
pve_vm_clone_vmid. Only pve_vm_exists is public, every other fact and
register is __pve_vm_.

The molecule scenario runs offline on noble and resolute: validation
with positive and refusal cases, drift detection over seeded VM configs,
and static checks over the role's task files that no proxmox_kvm task
or module_defaults entry carries cipassword and that the one task
deleting a stored cipassword is no_log. The API lifecycle and the
cloud-init wait are not exercised.

README Roadmap: the pve_vm wave 2 line and the opnsense and
proxmox_firewall line are removed; wave 3 stays.

Closes #482

Assisted-by: Claude Code:claude-opus-5-5
2026-11-29 20:10:33 +00:00
56 changed files with 1534 additions and 1440 deletions

No files matched your search

+1 -10
View File
@@ -2,8 +2,7 @@ name: Images
# Builds the images under images/ with kaniko (osscontainertools fork, v1.28.6) and
# pushes them to git.rkdr.net/mortis/<name>: the molecule
# test targets (molecule-ubuntu2404, molecule-ubuntu2604), the lint/build tooling (ci) and
# the Molecule controller (molecule-controller).
# test targets (molecule-ubuntu2404, molecule-ubuntu2604) and the lint/build tooling (ci).
#
# Never on pull_request: a workflow file comes from the PR head, so a fork PR could
# otherwise push to the registry. This workflow has no pull_request trigger, and the job
@@ -45,9 +44,6 @@ on: # yamllint disable-line rule:truthy
- 'requirements.yml'
- 'extensions/molecule/requirements.yml'
- '.pre-commit-config.yaml'
# The molecule-controller image bakes these (images/molecule-controller/Dockerfile).
- 'requirements-molecule.txt'
- 'requirements-molecule.lock'
- '.gitea/workflows/image.yml'
workflow_dispatch: {}
@@ -94,11 +90,6 @@ jobs:
subpath: ""
dockerfile: images/ci/Dockerfile
job_image: ubuntu:26.04@sha256:d66b366dac61b575bee2aef07e9c26e8070096fbe84a3d4d3eb0da069b5d76db
- name: molecule-controller
base: "0.1"
subpath: ""
dockerfile: images/molecule-controller/Dockerfile
job_image: ubuntu:26.04@sha256:d66b366dac61b575bee2aef07e9c26e8070096fbe84a3d4d3eb0da069b5d76db
container:
image: ${{ matrix.job_image }}
# Keeps a runaway build from taking the whole runner down with it.
+2 -2
View File
@@ -63,11 +63,11 @@ jobs:
# Used by the scenarios as `image: ${MOLECULE_IMAGE}`; set it the same way to run
# one locally.
MOLECULE_IMAGE: >-
git.rkdr.net/mortis/molecule-ubuntu2404:0.1.12@sha256:5f96ae95e16e205cc433607bab31307b36633ad73468aa7bdc57f4bbddb1c571
git.rkdr.net/mortis/molecule-ubuntu2404:0.1.11@sha256:e7389be9c397ec50fcf7d433c99cb9da7b16b149384aaa543e3c21a3ada1a4e1
# The same for Ubuntu 26.04, the release the hosts are moving to; used by
# `image: ${MOLECULE_IMAGE_2604}` in extensions/molecule/image-smoke-2604.
MOLECULE_IMAGE_2604: >-
git.rkdr.net/mortis/molecule-ubuntu2604:0.1.8@sha256:96496c7fb35e6091d08b057e53ba603256d07483769f27c19582d336ddc11173
git.rkdr.net/mortis/molecule-ubuntu2604:0.1.7@sha256:86ee99fe77ab4c9af3911570ae7238ce525375cfaf923e9656860606c47488df
# Names and labels this run's containers: the scenarios' as `${KAMINO_RUN_ID:-local}-<name>`
# with the label net.rkdr.mortis.molecule-run, and the one molecule runs in.
KAMINO_RUN_ID: ${{ github.run_id }}-${{ github.run_attempt }}
+3 -5
View File
@@ -2,10 +2,10 @@
An Ansible Collection of reusable, hardened roles for a self-hosted home lab:
`cloudflared`, `docker`, `fail2ban`, `gitea`, `gitea_runner`, `network_interfaces`,
`nfs_client`, `pihole`, `pve_lxc`, `sshd`, `system_baseline`, `systemd_hardening`, `tailscale`, `traefik`, `ufw` and
`user_management`, plus the internal `_binary_update`. Roles still to come are listed under [Roadmap](#roadmap).
`nfs_client`, `pihole`, `pve_lxc`, `pve_vm`, `sshd`, `system_baseline`, `systemd_hardening`, `tailscale`, `traefik`,
`ufw` and `user_management`, plus the internal `_binary_update`. Roles still to come are listed under [Roadmap](#roadmap).
Status: roles arrive in waves. Release 3.2.0 holds the `cloudflared`, `docker`, `fail2ban`, `gitea`, `gitea_runner`, `network_interfaces`, `pihole`, `pve_lxc`, `sshd`, `system_baseline`, `systemd_hardening`, `tailscale`, `traefik`, `ufw` and `user_management` roles (and the internal `_binary_update`, which `cloudflared`, `gitea`, `gitea_runner` and `traefik` call).
Status: roles arrive in waves. Release 3.2.0 holds the `cloudflared`, `docker`, `fail2ban`, `gitea`, `gitea_runner`, `network_interfaces`, `pihole`, `pve_lxc`, `sshd`, `system_baseline`, `systemd_hardening`, `tailscale`, `traefik`, `ufw` and `user_management` roles (and the internal `_binary_update`, which `cloudflared`, `gitea`, `gitea_runner` and `traefik` call). `nfs_client` and `pve_vm` are on `main` for the next release.
## Consuming
@@ -41,9 +41,7 @@ when its own prerequisites (tests, a safe cutover wherever the role already runs
Still to come:
- Wave 2: `pve_vm`.
- Wave 3: `rke2`, `proxmox_host`.
- Later, wave not yet assigned: `opnsense`, `proxmox_firewall`.
Will not be extracted (they serve one lab or install that lab's own tool pins):
`k8s_manage`, `k8s_localhost`, `k8s_lint_tools`, `minecraft_server`, `dragonwilds_server`,
+11
View File
@@ -0,0 +1,11 @@
---
minor_changes:
- >-
pve_vm - New role. Clones a Proxmox VE QEMU VM from a template through the Proxmox API (``community.proxmox``), sets
its cloud-init user, SSH keys and network, updates an existing VM only on detected drift, grows its boot disk,
applies the power state, waits for SSH and cloud-init and (with ``pve_vm_allow_destroy``) deletes it. It never sets
a cloud-init password and deletes one stored on the VM. Only ``pve_vm_exists`` is set for later plays. The input
checks run under ``tags: always``, so a tag-filtered run also needs ``pve_vm_api_user`` and
``pve_vm_api_token_secret`` (and ``pve_vm_disk_size`` while ``pve_vm_manage_disk`` is true). Declares
Ubuntu noble and resolute guests; the molecule scenario covers the input validation and the drift detection, not
the API lifecycle.
-61
View File
@@ -1,61 +0,0 @@
# molecule-controller
The **Molecule controller image** of the [`mortis.kamino`](https://git.rkdr.net/mortis/kamino) Collection:
the tools and collections Molecule runs with, and nothing Lint uses, so a tool bump that only Lint needs leaves
this image alone ([ADR 0003](../adr/0003-molecule-controller-image.md)). It is the controller: the scenarios'
target containers come from the `molecule-ubuntu*` images.
## What is in it
Ubuntu 26.04 with:
- **Python tools** in `/opt/venv` (on `PATH`; it runs on Python 3.14, the version of `.python-version`, from a
baked copy and not from the distribution's `python3`), from `requirements-molecule.lock` (the hashed lock of
`requirements-molecule.txt`, installed with `pip install --require-hashes`): `ansible-core`, `molecule` and
`molecule-plugins[docker]` (the Docker driver, with the `docker` Python SDK). Its `ansible-core` is the one of
`requirements-dev.lock`: `check_image_versions.py pins` fails when the two locks differ.
- **The collections the scenarios call** in `/opt/collections` (`ANSIBLE_COLLECTIONS_PATH` is set to it): those of
`requirements.yml` (`community.general`, `ansible.posix`, `community.proxmox`), which the roles call, and of
`extensions/molecule/requirements.yml` (`community.docker`), which the Docker driver's own playbooks call.
- `python3`, `python3-venv` and `ca-certificates` from the distribution. The image runs as root and sets no
working directory.
- `/opt/molecule-pins.sha256`: the checksums of the four pin files this image was built from.
It has no Docker CLI and no `git`: mount the host's Docker CLI and socket, and the checkout.
## How to use it
On the `kamino-molecule` runner, a host executor, start it with `docker run` as the runner user, with the Docker
socket, the host's Docker CLI and the checkout mounted at the same path (molecule hands the daemon paths in the
checkout). In the checkout root, run `sha256sum --quiet -c /opt/molecule-pins.sha256`: when it passes, use
`/opt/venv/bin` and `/opt/collections` as they are; when a pull request changed `requirements-molecule.txt`,
`requirements-molecule.lock`, `requirements.yml` or `extensions/molecule/requirements.yml`, install the pinned tools
and collections for that run first (slower, same result), until the image is rebuilt from `main`.
No workflow consumes it yet; the Molecule workflow still runs in the [`ci`](ci.md) image until its first pin is made
by hand.
## Tags and pinning
- `<version>` is semver, independent of the Collection's version. A published version is never moved or
rebuilt, so one digest belongs to exactly one version. `latest` is the newest version, for looking only.
- Pin `molecule-controller:<version>@sha256:<digest>`; the digest decides what is pulled.
## How it is built and kept up to date
`.gitea/workflows/image.yml` builds it with kaniko (repository root as build context, because the pin files are
copied in) on pushes to `main` that touch its inputs, never on a pull request, and publishes the next patch of the
matrix's `base:` when its inputs differ from those of its newest published version. Its last build step checks
itself: the tools run on the pinned Python at the locked versions, the Docker driver loads, every pinned collection
is installed and the pin record verifies. It has no image-smoke scenario: the full Molecule run of its pin pull
request proves it. The build prints the compressed size of each layer directory, and each pushed layer stays below
100 MB (Cloudflare's request limit).
## Image metadata
The `org.opencontainers.image.*` labels (title, description, version, revision, created, source,
documentation, licenses, authors) and `net.rkdr.mortis.*` labels (what it is for, what it contains,
how to use it; the base image is `base.name`) are listed on the package page of the registry; `version`,
`revision` and `created` are set by the build.
Source: [https://git.rkdr.net/mortis/kamino](https://git.rkdr.net/mortis/kamino), `images/molecule-controller/Dockerfile`. Licence: GPL-3.0-or-later.
+3 -4
View File
@@ -11,10 +11,9 @@ It is the release the hosts run today.
- systemd as the init system (`systemd`, `systemd-sysv`), D-Bus, `sudo`, `iproute2`,
`ca-certificates`.
- Python for Ansible on the target: `python3`, `python3-apt`, `python3-systemd`.
- Test fixtures no role installs: `iptables`, `openssh-server` (the `ssh` unit is enabled), and
`gnupg` (the docker scenario signs its stand-in APT repository with it).
- No package a role installs, such as `ufw` or `fail2ban`: the role's scenario exercises that
install. The APT lists are removed, so such a scenario refreshes the APT cache in its prepare.
- The packages the roles manage, preinstalled so a converge makes no network calls:
`iptables`, `ufw`, `fail2ban`, `openssh-server` (the `ssh` unit is enabled), and `gnupg`
(the docker scenario signs its stand-in APT repository with it).
- Throwaway SSH host keys and a machine-id generated at build time. They are not secrets and the
image is a test target that must never be exposed to a network.
+3 -4
View File
@@ -11,10 +11,9 @@ It is the release the hosts are moving to; every role scenario whose role declar
- systemd as the init system (`systemd`, `systemd-sysv`), D-Bus, `sudo`, `iproute2`,
`ca-certificates`.
- Python for Ansible on the target: `python3`, `python3-apt`, `python3-systemd`.
- Test fixtures no role installs: `iptables`, `openssh-server` (the `ssh` unit is enabled), and
`gnupg` (the docker scenario signs its stand-in APT repository with it).
- No package a role installs, such as `ufw` or `fail2ban`: the role's scenario exercises that
install. The APT lists are removed, so such a scenario refreshes the APT cache in its prepare.
- The packages the roles manage, preinstalled so a converge makes no network calls:
`iptables`, `ufw`, `fail2ban`, `openssh-server` (the `ssh` unit is enabled), and `gnupg`
(the docker scenario signs its stand-in APT repository with it).
- root's `sudo` skips the PAM account check (`pam_rootok`), so `become` works in the container.
- Throwaway SSH host keys and a machine-id generated at build time. They are not secrets and the
image is a test target that must never be exposed to a network.
@@ -15,7 +15,7 @@
ansible.builtin.package_facts:
manager: auto
- name: The fixtures the scenarios need are preinstalled
- name: The packages the roles manage are preinstalled
ansible.builtin.assert:
that: item in ansible_facts['packages']
quiet: true
@@ -30,6 +30,8 @@
- python3-apt
- python3-systemd
- iptables
- ufw
- fail2ban
- openssh-server
- gnupg
+3 -1
View File
@@ -15,7 +15,7 @@
ansible.builtin.package_facts:
manager: auto
- name: The fixtures the scenarios need are preinstalled
- name: The packages the roles manage are preinstalled
ansible.builtin.assert:
that: item in ansible_facts['packages']
quiet: true
@@ -30,6 +30,8 @@
- python3-apt
- python3-systemd
- iptables
- ufw
- fail2ban
- openssh-server
- gnupg
+2 -4
View File
@@ -7,7 +7,7 @@ authors:
- Defame1297
description: >-
Reusable, hardened Ansible roles for a self-hosted home lab (cloudflared, docker, fail2ban,
gitea, gitea_runner, network_interfaces, nfs_client, pihole, pve_lxc, sshd, system_baseline,
gitea, gitea_runner, network_interfaces, nfs_client, pihole, pve_lxc, pve_vm, sshd, system_baseline,
systemd_hardening, tailscale, traefik, ufw, user_management; _binary_update is internal).
license:
- GPL-3.0-or-later
@@ -22,7 +22,7 @@ homepage: https://git.rkdr.net/mortis/kamino
issues: https://git.rkdr.net/mortis/kamino/issues
# CI tests the versions pinned in requirements.yml; the lower bounds here are not tested.
# No upper bound, so a consumer's newer pin does not conflict. community.general is used by system_baseline and ufw,
# ansible.posix by nfs_client, system_baseline and user_management, community.proxmox by pve_lxc (Proxmox VE guest lifecycle).
# ansible.posix by nfs_client, system_baseline and user_management, community.proxmox by pve_lxc and pve_vm (Proxmox VE guest lifecycle).
# community.proxmox's modules import the Python library proxmoxer (2.3 or later) on the controller; galaxy.yml
# cannot declare a Python dependency, so the README says it and requirements-dev.txt pins it for CI.
dependencies:
@@ -63,8 +63,6 @@ build_ignore:
- ruff.toml
- requirements-dev.txt
- requirements-dev.lock
- requirements-molecule.txt
- requirements-molecule.lock
- requirements.yml
- gitleaks-report.json
- importer_result.json
+3 -8
View File
@@ -1,7 +1,7 @@
# Image rules
Every rule for the CI and test images in `images/` (`ci`, `molecule-controller`,
`molecule-ubuntu2404`, `molecule-ubuntu2604`), their build in `.gitea/workflows/image.yml`, and the image-smoke
Every rule for the CI and test images in `images/` (`ci`, `molecule-ubuntu2404`,
`molecule-ubuntu2604`), their build in `.gitea/workflows/image.yml`, and the image-smoke
scenarios in `extensions/molecule/`, in full. Each gives its reason (*Why*) and how it is held
(*Held*): a control names its hook or check; review means a person other than the author sees the
change before it merges (`images/` and `.gitea/` are under `CODEOWNERS`); aspirational means
@@ -40,7 +40,7 @@ it to this repository's organisation in the Gitea registry as `<version>` and `l
## Releases and the build container
- **Each molecule target image (`molecule-ubuntu*`) is one Ubuntu release, named after it; a new release is a new image,
- **Each molecule image is one Ubuntu release, named after it; a new release is a new image,
added by hand** (Renovate's major `ubuntu` updates are disabled). Roles are tested on every
release a target host runs. *Why:* a role is only proven on the release it runs on. *Held:*
review.
@@ -90,8 +90,3 @@ it to this repository's organisation in the Gitea registry as `<version>` and `l
`MOLECULE_IMAGE` or `MOLECULE_IMAGE_2604` in `molecule.yml`, so a pin pull request runs them.
*Why:* an image is proven by its own pin pull request before a role depends on it. *Held:*
control: the scenarios, in the Molecule check.
- **`molecule-controller` has no image-smoke scenario: the last `RUN` of its Dockerfile checks
its tool versions, Docker driver, collections and pin checksums, and the full Molecule run of
its pin pull request proves the rest.** *Why:* it is the controller of every scenario, not a
target of one, so a full run tests it more than a scenario of its own could. *Held:* control: the self-checks fail the
build on `main`; review for the full run on the pin pull request.
-130
View File
@@ -1,130 +0,0 @@
# Controller image of the Molecule workflow of this Collection (ADR 0003): molecule, its Docker
# driver and the collections the scenarios call are baked in, and nothing Lint uses, so a tool
# bump that only Lint needs leaves this image, and the scenarios it selects, alone.
#
# Built by .gitea/workflows/image.yml with kaniko (repository root as build context, because
# the pin files below are copied in) and pushed, never on pull requests, to
# git.rkdr.net/mortis/molecule-controller.
#
# What is baked in, and from where:
# - /opt/venv: requirements-molecule.lock, the hashed lock of requirements-molecule.txt
# (ansible-core, molecule, molecule-plugins[docker] with the docker Python SDK), on the Python
# of .python-version (PYTHON_VERSION below), the one the lock was resolved on.
# - /opt/collections: the collections of requirements.yml (the ones the roles call) and of
# extensions/molecule/requirements.yml (community.docker, which the Docker driver's own
# playbooks call), found through ANSIBLE_COLLECTIONS_PATH.
# - /opt/molecule-pins.sha256: the checksums of the four pin files this image was built from. A
# job runs `sha256sum -c /opt/molecule-pins.sha256` in its checkout; when a pull request changes
# a pin the check fails and the job installs the pinned tools and collections itself.
#
# No image-smoke scenario: the last RUN checks the tools and the pin record, and a full Molecule
# run on the image's pin pull request proves the rest (images/AGENTS.md).
#
# Layers: each COPY / RUN below is one layer, and a layer is pushed as one request, so it must
# stay below Cloudflare's 100 MB request-body limit on git.rkdr.net. The build stage prints the
# compressed size of each directory it copies.
FROM ubuntu:26.04@sha256:d66b366dac61b575bee2aef07e9c26e8070096fbe84a3d4d3eb0da069b5d76db AS os
ENV DEBIAN_FRONTEND=noninteractive
# python3 and python3-venv only bootstrap uv in the build stage; ca-certificates serve the
# install a job runs when a pull request changes a pin. apt lists are removed in the same layer.
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates python3 python3-venv \
&& rm -rf /var/lib/apt/lists/*
FROM os AS build
# The Python of /opt/venv: the minor version of .python-version (check_image_versions.py pins fails
# when an ARG PYTHON_VERSION line, or a lock header, differs from it).
ARG PYTHON_VERSION=3.14
ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_NO_CACHE_DIR=1 \
UV_PYTHON_INSTALL_DIR=/opt/python \
UV_PYTHON_BIN_DIR=/opt/python-bin
WORKDIR /src
COPY requirements-molecule.txt requirements-molecule.lock requirements.yml ./
# Kept at its checkout path: its name matches the root requirements.yml.
COPY extensions/molecule/requirements.yml extensions/molecule/
# uv lives only in this stage; the final image keeps the interpreter it downloaded. libpython is
# removed when the binary does not link it (about 10 MB compressed nothing here loads), as in ci.
RUN set -eu; \
python3 -m venv /opt/uv-venv; \
/opt/uv-venv/bin/pip install uv==0.13.9; \
/opt/uv-venv/bin/uv python install "${PYTHON_VERSION}"; \
d="$(echo /opt/python/cpython-${PYTHON_VERSION}.*/)"; \
if ldd "${d}bin/python${PYTHON_VERSION}" | grep -q libpython; then \
echo "python${PYTHON_VERSION} links libpython: keeping it"; \
else \
rm -f "${d}"lib/libpython*.so*; \
fi
RUN "$(echo /opt/python/cpython-${PYTHON_VERSION}.*/bin/python${PYTHON_VERSION})" -m venv /opt/venv \
&& /opt/venv/bin/pip install --require-hashes -r requirements-molecule.lock -r requirements-molecule.txt
# ANSIBLE_COLLECTIONS_PATH is the target for the install only: a collection found anywhere else on
# the path would be skipped as "already installed" and not copied here.
RUN set -eu; \
for req in requirements.yml extensions/molecule/requirements.yml; do \
ANSIBLE_COLLECTIONS_PATH=/opt/collections \
/opt/venv/bin/ansible-galaxy collection install -r "$req" -p /opt/collections; \
done; \
gz() { tar -C "$(dirname "$1")" -cf - "$(basename "$1")" | gzip -6 | wc -c \
| awk -v d="$1" '{printf "%7.1f MB compressed %s\n", $1 / 1048576, d}'; }; \
for d in /opt/venv /opt/python /opt/collections; do gz "$d"; done
FROM os AS final
ARG PYTHON_VERSION=3.14
LABEL org.opencontainers.image.title="molecule-controller" \
org.opencontainers.image.description="Molecule controller image for the mortis.kamino Ansible Collection: the Molecule workflow runs molecule in it, so a tool only Lint uses does not change it. It bakes in ansible-core, molecule, molecule-plugins with the docker Python SDK, the collections of requirements.yml and extensions/molecule/requirements.yml, and the Python of .python-version (the tools in /opt/venv run on it). Pin it by tag and digest and start it with docker run; it has no Docker CLI, so mount the host one." \
org.opencontainers.image.source="https://git.rkdr.net/mortis/kamino" \
org.opencontainers.image.url="https://git.rkdr.net/mortis/kamino" \
org.opencontainers.image.documentation="https://git.rkdr.net/mortis/kamino/src/branch/main/docs/images/molecule-controller.md" \
org.opencontainers.image.licenses="GPL-3.0-or-later" \
org.opencontainers.image.authors="Defame1297 and contributors" \
org.opencontainers.image.base.name="ubuntu:26.04" \
net.rkdr.mortis.purpose="Molecule controller image for the mortis.kamino Ansible Collection: the Molecule workflow runs molecule in it, so a tool only Lint uses does not change it." \
net.rkdr.mortis.contents="Ubuntu 26.04, /opt/venv (ansible-core, molecule, molecule-plugins[docker]), /opt/collections (community.general, ansible.posix, community.proxmox, community.docker), python<PYTHON_VERSION> (the one of /opt/venv), python3 (distribution), /opt/molecule-pins.sha256" \
net.rkdr.mortis.usage="Molecule (host executor, kamino-molecule runner): docker run as the runner user, with the Docker socket, the host Docker CLI and the checkout mounted at the same path. Run sha256sum -c /opt/molecule-pins.sha256 in the checkout root and install the pinned tools and collections when a pull request changed them, else use /opt/venv/bin and ANSIBLE_COLLECTIONS_PATH=/opt/collections. See the documentation label."
ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \
ANSIBLE_COLLECTIONS_PATH=/opt/collections \
PATH=/opt/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
COPY --from=build /opt/venv /opt/venv
COPY --from=build /opt/collections /opt/collections
COPY --from=build /opt/python /opt/python
# The pin record, under checkout paths so `sha256sum -c` in a checkout root finds the files.
COPY --from=build /src/requirements-molecule.txt /src/requirements-molecule.lock /src/requirements.yml /opt/molecule-pins/
COPY --from=build /src/extensions/molecule/requirements.yml /opt/molecule-pins/extensions/molecule/
# Self-checks: the tools run on the pinned Python, every pinned collection is installed and the pin
# record verifies against the files it was made from. A failure fails the build, not a later job.
RUN set -eu; \
cd /opt/molecule-pins; \
sha256sum requirements-molecule.txt requirements-molecule.lock requirements.yml \
extensions/molecule/requirements.yml > /opt/molecule-pins.sha256; \
sha256sum --quiet -c /opt/molecule-pins.sha256; \
python -c "import sys; assert '%d.%d' % sys.version_info[:2] == '${PYTHON_VERSION}', sys.version"; \
core="$(sed -n 's/^ansible-core==\([^ ]*\).*/\1/p' requirements-molecule.lock)"; \
test -n "$core"; \
ansible --version | head -n1 | grep -F "core ${core}]"; \
mol="$(sed -n 's/^molecule==\([^ ]*\).*/\1/p' requirements-molecule.lock)"; \
test -n "$mol"; \
molecule --version | grep -F "molecule ${mol}"; \
molecule drivers | grep -qw docker; \
python -c "import docker"; \
collections="$(ansible-galaxy collection list --format json)"; \
for c in $(sed -n 's/^ *- name: *//p' requirements.yml extensions/molecule/requirements.yml); do \
printf '%s' "$collections" | python -c "import json, sys; d = json.load(sys.stdin); sys.exit(0 if any('$c' in v for v in d.values()) else 1)" \
|| { echo "collection $c is not installed" >&2; exit 1; }; \
done; \
ansible-galaxy collection list
+12 -10
View File
@@ -1,7 +1,7 @@
# Molecule test target for the roles of this Collection: Ubuntu 24.04 with systemd
# as PID 1 and the fixtures the scenarios need preinstalled. A package a role installs
# is not baked in, so its scenario exercises the install (ADR 0002). It replaces the
# molecule test image that used to be built locally on the CI runner.
# as PID 1 and the packages the roles manage preinstalled, so a converge makes no
# network calls. It replaces the molecule test image that used to be built locally
# on the CI runner.
#
# Built by .gitea/workflows/image.yml with kaniko and pushed (never on pull
# requests) to git.rkdr.net/mortis/molecule-ubuntu2404. Consumers reference it
@@ -14,7 +14,7 @@
# scenario starts it with command /sbin/init, cgroupns_mode host, /sys/fs/cgroup
# mounted rw, tmpfs on /run and /run/lock, capability NET_ADMIN. No privileged mode.
#
# One RUN layer: at most about 30 MB compressed on top of the 29.8 MB base (estimated from
# One RUN layer: about 30 MB compressed on top of the 29.8 MB base (estimated from
# the real .debs, with the .pyc files the postinst scripts compile), far below
# Cloudflare's 100 MB request-body limit on git.rkdr.net (kaniko pushes a layer as
# one request; gnupg adds a few MB, not measured). apt packages are not version-pinned, as in the original image; the
@@ -28,7 +28,7 @@
FROM ubuntu:24.04@sha256:562111b88caa79c71391c0c4d3c2114a7d5c35915c20561fd893cb1e07929e6b
LABEL org.opencontainers.image.title="molecule-ubuntu2404" \
org.opencontainers.image.description="Disposable Ubuntu 24.04 test target for the molecule scenarios of the mortis.kamino Ansible Collection. systemd runs as PID 1 with D-Bus, sudo, python3 and the test fixtures (iptables, openssh-server, gnupg) preinstalled. A package a role installs is not baked in and no APT lists are kept, so a scenario refreshes the APT cache before a role installs one. Start it as a molecule platform (usage label); it carries throwaway SSH host keys and is a test target only, never to be exposed." \
org.opencontainers.image.description="Disposable Ubuntu 24.04 test target for the molecule scenarios of the mortis.kamino Ansible Collection. systemd runs as PID 1 with D-Bus, sudo, python3 and the packages the roles manage (iptables, ufw, fail2ban, openssh-server) preinstalled, so a converge makes no network calls. Start it as a molecule platform (usage label); it carries throwaway SSH host keys and is a test target only, never to be exposed." \
org.opencontainers.image.source="https://git.rkdr.net/mortis/kamino" \
org.opencontainers.image.url="https://git.rkdr.net/mortis/kamino" \
org.opencontainers.image.documentation="https://git.rkdr.net/mortis/kamino/src/branch/main/docs/images/molecule-ubuntu2404.md" \
@@ -36,20 +36,22 @@ LABEL org.opencontainers.image.title="molecule-ubuntu2404" \
org.opencontainers.image.authors="Defame1297 and contributors" \
org.opencontainers.image.base.name="ubuntu:24.04" \
net.rkdr.mortis.purpose="Disposable Ubuntu 24.04 test target for the molecule scenarios of the mortis.kamino Ansible Collection." \
net.rkdr.mortis.contents="Ubuntu 24.04, systemd, systemd-sysv, dbus, sudo, iproute2, ca-certificates, python3, python3-apt, python3-systemd, iptables, openssh-server (ssh enabled), gnupg" \
net.rkdr.mortis.contents="Ubuntu 24.04, systemd, systemd-sysv, dbus, sudo, iproute2, ca-certificates, python3, python3-apt, python3-systemd, iptables, ufw, fail2ban, openssh-server (ssh enabled), gnupg" \
net.rkdr.mortis.usage="Molecule docker-driver platform with pre_build_image true, command /sbin/init, cgroupns_mode host, /sys/fs/cgroup mounted rw, tmpfs on /run and /run/lock, capability NET_ADMIN, security_opts apparmor=unconfined (not privileged). Pin git.rkdr.net/mortis/name:version@sha256:digest. See the documentation label."
ENV DEBIAN_FRONTEND=noninteractive
# systemd as PID 1 with D-Bus, sudo and networking tools; the Python Ansible needs on
# the target (python3-apt for the apt module, python3-systemd for the journal); iptables;
# sshd, enabled so a converge can test it under systemd; gnupg, which the docker scenario
# signs its stand-in APT repository with. ufw and fail2ban are left out: their roles install them.
# the target (python3-apt for the apt module); the firewall and intrusion-prevention
# packages the roles manage (python3-systemd is a dependency of fail2ban's systemd
# backend); sshd, enabled so a converge can test it under systemd; gnupg, which the docker
# scenario signs its stand-in APT repository with and which would otherwise cost it an
# apt update and install in every run.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
systemd systemd-sysv dbus sudo iproute2 ca-certificates \
python3 python3-apt python3-systemd \
iptables \
iptables ufw fail2ban \
openssh-server \
gnupg \
&& rm -rf /var/lib/apt/lists/* \
+12 -10
View File
@@ -1,7 +1,7 @@
# Molecule test target for the roles of this Collection: Ubuntu 26.04 with systemd
# as PID 1 and the fixtures the scenarios need preinstalled. A package a role installs
# is not baked in, so its scenario exercises the install (ADR 0002). It replaces the
# molecule test image that used to be built locally on the CI runner.
# as PID 1 and the packages the roles manage preinstalled, so a converge makes no
# network calls. It replaces the molecule test image that used to be built locally
# on the CI runner.
#
# Built by .gitea/workflows/image.yml with kaniko and pushed (never on pull
# requests) to git.rkdr.net/mortis/molecule-ubuntu2604. Consumers reference it
@@ -14,7 +14,7 @@
# scenario starts it with command /sbin/init, cgroupns_mode host, /sys/fs/cgroup
# mounted rw, tmpfs on /run and /run/lock, capability NET_ADMIN. No privileged mode.
#
# One RUN layer: at most about 30 MB compressed on top of the 29.8 MB base (estimated from
# One RUN layer: about 30 MB compressed on top of the 29.8 MB base (estimated from
# the real .debs, with the .pyc files the postinst scripts compile), far below
# Cloudflare's 100 MB request-body limit on git.rkdr.net (kaniko pushes a layer as
# one request; gnupg adds a few MB, not measured). apt packages are not version-pinned, as in the original image; the
@@ -28,7 +28,7 @@
FROM ubuntu:26.04@sha256:d66b366dac61b575bee2aef07e9c26e8070096fbe84a3d4d3eb0da069b5d76db
LABEL org.opencontainers.image.title="molecule-ubuntu2604" \
org.opencontainers.image.description="Disposable Ubuntu 26.04 test target for the molecule scenarios of the mortis.kamino Ansible Collection. systemd runs as PID 1 with D-Bus, sudo, python3 and the test fixtures (iptables, openssh-server, gnupg) preinstalled. A package a role installs is not baked in and no APT lists are kept, so a scenario refreshes the APT cache before a role installs one. Start it as a molecule platform (usage label); it carries throwaway SSH host keys and is a test target only, never to be exposed." \
org.opencontainers.image.description="Disposable Ubuntu 26.04 test target for the molecule scenarios of the mortis.kamino Ansible Collection. systemd runs as PID 1 with D-Bus, sudo, python3 and the packages the roles manage (iptables, ufw, fail2ban, openssh-server) preinstalled, so a converge makes no network calls. Start it as a molecule platform (usage label); it carries throwaway SSH host keys and is a test target only, never to be exposed." \
org.opencontainers.image.source="https://git.rkdr.net/mortis/kamino" \
org.opencontainers.image.url="https://git.rkdr.net/mortis/kamino" \
org.opencontainers.image.documentation="https://git.rkdr.net/mortis/kamino/src/branch/main/docs/images/molecule-ubuntu2604.md" \
@@ -36,22 +36,24 @@ LABEL org.opencontainers.image.title="molecule-ubuntu2604" \
org.opencontainers.image.authors="Defame1297 and contributors" \
org.opencontainers.image.base.name="ubuntu:26.04" \
net.rkdr.mortis.purpose="Disposable Ubuntu 26.04 test target for the molecule scenarios of the mortis.kamino Ansible Collection." \
net.rkdr.mortis.contents="Ubuntu 26.04, systemd, systemd-sysv, dbus, sudo, iproute2, ca-certificates, python3, python3-apt, python3-systemd, iptables, openssh-server (ssh enabled), gnupg" \
net.rkdr.mortis.contents="Ubuntu 26.04, systemd, systemd-sysv, dbus, sudo, iproute2, ca-certificates, python3, python3-apt, python3-systemd, iptables, ufw, fail2ban, openssh-server (ssh enabled), gnupg" \
net.rkdr.mortis.usage="Molecule docker-driver platform with pre_build_image true, command /sbin/init, cgroupns_mode host, /sys/fs/cgroup mounted rw, tmpfs on /run and /run/lock, capability NET_ADMIN, security_opts apparmor=unconfined (not privileged). Pin git.rkdr.net/mortis/name:version@sha256:digest. See the documentation label."
ENV DEBIAN_FRONTEND=noninteractive
# systemd as PID 1 with D-Bus, sudo and networking tools; the Python Ansible needs on
# the target (python3-apt for the apt module, python3-systemd for the journal); iptables;
# sshd, enabled so a converge can test it under systemd; gnupg, which the docker scenario
# signs its stand-in APT repository with. ufw and fail2ban are left out: their roles install them.
# the target (python3-apt for the apt module); the firewall and intrusion-prevention
# packages the roles manage (python3-systemd is a dependency of fail2ban's systemd
# backend); sshd, enabled so a converge can test it under systemd; gnupg, which the docker
# scenario signs its stand-in APT repository with and which would otherwise cost it an
# apt update and install in every run.
# root's sudo (Ansible's become here) skips pam_unix's account check, whose unix_chkpwd
# helper fails inside the container; non-root callers still go through pam_unix.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
systemd systemd-sysv dbus sudo iproute2 ca-certificates \
python3 python3-apt python3-systemd \
iptables \
iptables ufw fail2ban \
openssh-server \
gnupg \
&& rm -rf /var/lib/apt/lists/* \
+4 -6
View File
@@ -31,8 +31,7 @@
},
"pip-compile": {
"managerFilePatterns": [
"/^requirements-dev\\.lock$/",
"/^requirements-molecule\\.lock$/"
"/^requirements-dev\\.lock$/"
]
},
"pre-commit": {
@@ -54,10 +53,9 @@
"customManagers": [
{
"customType": "regex",
"description": "The uv pin that installs the build-stage Python interpreters of the ci and molecule-controller images (their Dockerfiles). It is an image input: the merge publishes a new version of each.",
"description": "The uv pin that installs the build-stage Python interpreters of the ci image (images/ci/Dockerfile). It is an image input: the merge publishes a new ci version.",
"managerFilePatterns": [
"/^images/ci/Dockerfile$/",
"/^images/molecule-controller/Dockerfile$/"
"/^images/ci/Dockerfile$/"
],
"matchStrings": [
"\\buv==(?<currentValue>[0-9][0-9A-Za-z.+!_-]*)"
@@ -126,7 +124,7 @@
]
},
{
"description": "ansible-core and ansible-lint move together (the lint rules follow the core version). Minor and patch bumps automerge like the rest, majors are manual. A new ansible-core minor can bring new sanity findings: the shared tests/sanity/ignore-common.txt covers the known ones, and the Build check (ansible-test sanity) is the gate, so a bump that shows new findings stays red and is not merged. The group spans requirements-dev.lock and requirements-molecule.lock, so one pull request moves both ansible-core pins, which check_image_versions.py pins holds equal.",
"description": "ansible-core and ansible-lint move together (the lint rules follow the core version). Minor and patch bumps automerge like the rest, majors are manual. A new ansible-core minor can bring new sanity findings: the shared tests/sanity/ignore-common.txt covers the known ones, and the Build check (ansible-test sanity) is the gate, so a bump that shows new findings stays red and is not merged.",
"groupName": "ansible tooling",
"matchDatasources": [
"pypi"
-846
View File
@@ -1,846 +0,0 @@
#
# This file is autogenerated by pip-compile with Python 3.14
# by the following command:
#
# pip-compile --allow-unsafe --generate-hashes --output-file=requirements-molecule.lock --strip-extras requirements-molecule.txt
#
ansible-compat==26.11.1 \
--hash=sha256:d22e0a48d8d79e727b0f56db3573b02bde2189b5bfbef067230a34c0bcbff94a \
--hash=sha256:ed9717fde1705a58678c1503e46316a36f7392229c2444d2b2f1b6de12be9f25
# via molecule
ansible-core==2.22.0 \
--hash=sha256:8285d4cc81c3e3eb2d954e75531724fe0ae154d228475638123451f034a74657 \
--hash=sha256:bf50b4a0cfa985e30585c7ba301897ea7050d224ca49d2816cab10e33a160e1c
# via
# -r requirements-molecule.txt
# ansible-compat
# molecule
attrs==26.1.0 \
--hash=sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309 \
--hash=sha256:d03ceb89cb322a8fd706d4fb91940737b6642aa36998fe130a9bc96c985eff32
# via
# jsonschema
# referencing
bracex==3.2.4 \
--hash=sha256:82e9e738b63fca213c33211d30b0b1ca330896a1091736e78da2c1bcda93ab30 \
--hash=sha256:c1e67eb59f81445dee15b2c588b7c81352b697cfbd6c4931a2943ea6b71eb5ea
# via wcmatch
certifi==2026.11.20 \
--hash=sha256:7422df25243767b9877031a2248cb14d09ddac9beee846f4cef3d5c9191d488f \
--hash=sha256:af1cb240a8133f105aa52684a3a3258339d7f2fd0bd4e2812698ff5cf5588c4e
# via requests
cffi==2.1.1 \
--hash=sha256:046bfc24911b37851ee1b51aab8bffe713d89c68c6a057b09484ce9fd5f69b4e \
--hash=sha256:06c72bb76605a4b0cd0aad6930b69d4baf7dd5d806cfc409b824191099700e66 \
--hash=sha256:0beceaabe56af686895136a2de78db54ecd8e4046b236b8fd6d6cb61389e9bf2 \
--hash=sha256:154852545011f779917b11c78db2358d095da62a9a172b78ad0a583ee5adc0d0 \
--hash=sha256:194cffa889098ced9976c3fc6340305e43f6303657d298da55366907c05c22d6 \
--hash=sha256:19ee6127ee34de7d83ce3d371ebc5ed91addbdcc39f9ab15ce4eb35a4e534971 \
--hash=sha256:1a18a57b58cfb21fc28d72e876acf10eaed67a1ed96226f92af4df681d571c4c \
--hash=sha256:1aa5645c30469b09530c4ebca77ebf8f17618293c58f8549cb1a543a50236e7d \
--hash=sha256:1dea0e4d7d4f11f619fe8c1d76caf49e24405b4b5743c0e3be16a500ecd930c9 \
--hash=sha256:208f941bb9d18e768138677f0a6d2ce01f590df56043dda1df1535ac57c88517 \
--hash=sha256:210019b6c7cf07f081b4c54635c8cf744377001350e29cc0f81c4377b4797735 \
--hash=sha256:246fa40ce8645a614ff682e0b70f37134e460eaf93a775e0cbe3cca585a67a80 \
--hash=sha256:25792eac27877609e7bb06d42ff88278a6624fff2ba9bbb523c09616b117e80f \
--hash=sha256:27350daa11d4f10c540e6e89dada4c54feb7256ad03e9a4dc075ebad7ba360d1 \
--hash=sha256:28907ab9bfb6aa13184cfc17c6b8e1023c5ab6fd7076d8c20a35e59fe04f8f29 \
--hash=sha256:2ae64be792b8966f2c69538199728b290e34726562896df1e5dc8ffd8d8188e8 \
--hash=sha256:31348097ff5bbe827ccc41795d4dd099d9f0625e7def00ee653c137a490c2a6c \
--hash=sha256:3143d81e29e1e20a9ce10901ec369012947876596f75a222235965f2b7ae832e \
--hash=sha256:3222ba5d678f80a030e6afbcc33dc1ae5cb45facabb61cee2c7016b8432fde48 \
--hash=sha256:3311ed60d36f83378794e1009ac6258bafbf81f7888b4caa7b35a521e3f95813 \
--hash=sha256:334644fbac4eff73d985a17a91226df55d0f394160c4cfb880e084c8f7161cac \
--hash=sha256:34e261f78cb6ceaaa36f42f2613f4380d94d9c759a9c73c769ee6e0247364632 \
--hash=sha256:363e05fa78e15116c3c32c210ee36884fd6b9afa6d440e47112c3bd511d64cb6 \
--hash=sha256:398aff33cee2767e3e781d2554c54bd0dff386bb437581e0d8011fde1a942ec1 \
--hash=sha256:3d22a20b1fb1632cc72c22f95f7b0d2961c3e1c235f245ba4c606c4771035659 \
--hash=sha256:42a494cee34437f05546455144f2b5d9ac09b1face62bcfce597d2e521066688 \
--hash=sha256:42e2f76b9455f5a9a844f770bf3e200ed3da0e15f5df3db9c31fe80b04b3d004 \
--hash=sha256:42f6930c31dc7f50732c9ae793c2786c7b6b044195967bbdde40bb9be81c4cc0 \
--hash=sha256:456a61fa52d579ebf9df2e9552ead5129855dbaff6c1e5a9b1bc408809bdc062 \
--hash=sha256:471cee653ae88de62096552e6d24ccb4a5adb8c8c9f10b5054d0122c15bf2779 \
--hash=sha256:49cbc70e6542d4ccccb936558d1064a8012541e78f821f955cff24e357776c94 \
--hash=sha256:4a7c934f7360e8cd64fe9efadcbd10c7c6364f531e432b9a4bf5ccbc9e0e8b50 \
--hash=sha256:4be96343e422f2dfcd12ab5c9f5aebe03f82f737c6bffeca6830b3875cb44aab \
--hash=sha256:4f42141fc14250de6dde5ee7ea4432be017252d91f19c5ad043c084cea629cac \
--hash=sha256:507a24c282e0f42f8ed737cf048572cbf580468da5555764a8331735e9c736b6 \
--hash=sha256:51b31d1c98274844cfd7838ce00bfc27c7423a4dc00fc0772fc3331c2cc90676 \
--hash=sha256:58acb8ab8e295e6c5ea12f888cbb13cf21511ef2a3303a23f4325c29d17fe5c1 \
--hash=sha256:5a59cc1c4442bc3d5c703bf720b51138d0bfc173618807c9ee2490a7541dd3d9 \
--hash=sha256:5bb4e7ea95dcd6a014a6fef62e62467d67d8e582326443f3d68e71d6320a9fcf \
--hash=sha256:5c58fe613dc5e5336357eff555824a314d8e43282600435c8d1cb6a7a2fedd13 \
--hash=sha256:5e7cecbaadb83884793e05828cee59b210b24583b9c7425d0ba6a754fe22eb4e \
--hash=sha256:616f097f2fe415bc92a247f02e11f634e1f9e9a83d327e3c915c15089c87869e \
--hash=sha256:63bbfd5ded17c4840ac07cd8f1c21ba9d9708141f840b324f422f41b207e3973 \
--hash=sha256:64faea20f4e2613363a1a9b9c7dd73058f3ecd00133a511e72ad7c511658f527 \
--hash=sha256:661c298b4821edebead0c91edd2b00374d67ad7c5a1f7a91d4442633b79d6a72 \
--hash=sha256:68e62fe11f30d5ca8289242866f0a5291402d8529ca2178ab8afc5c9694ae890 \
--hash=sha256:6a8dddef476fab96d066d578fc88526767b836ab5ab21754e1d5bf3879c31c7c \
--hash=sha256:6e192623c49c94421616a5778fba35cf0d5a8d000650c1967ef4448ee5cdd990 \
--hash=sha256:7225e4514edb64eb6740324353e0da0711954fd8d7da4576755b1c6e09b697cd \
--hash=sha256:75f80557d1389eddbd0de2681f6a390a0c5338c31ddaa821381c203fc3fd50d9 \
--hash=sha256:770de9db11e84213beec501cfcaa013b019820ca881e03344dea5844f7876d94 \
--hash=sha256:7750c6449dff7864bb9bb27ddfb0267756189201a3afc911d82b3caacd70dfc3 \
--hash=sha256:7bde5e4cc5c10140859842b9d383af292b22639a4dffb725314baf45968cef80 \
--hash=sha256:7ce713ace7c0e4520535b42b77eaa742c16dab813978064913e5a3cf82973b41 \
--hash=sha256:7da0c5eff80f0197f3b3d1232ec5a682a9325f4ae9016a78f5f5ca35f9ced1f5 \
--hash=sha256:7dbb61fe3a7699468030f71bbe5f8a0e326a151daa91beb11a6fc1f980c55e1c \
--hash=sha256:811bd1e21d32de12efca32393a0ab3f5133b54fce9bd44b8bd77ab07da14bf6a \
--hash=sha256:8ef53b2de9bcb9197d31854256575d59dbac0cba72ac627bb291ef5eceb74be4 \
--hash=sha256:937c0052c05a31ca1daf18de3158eed4dbfcb9cc107adbea227728d647be701e \
--hash=sha256:9d2055050ea716bd38b7f7f1579c275386646b4894c155a3e2f3cd62ed41b7c6 \
--hash=sha256:9f8d177621de5cb38ee3e731eda45d421db093ec0739f46a5594babda7987a98 \
--hash=sha256:a2d7755bef5a12ed488f4ef1f1b69ee9191d7396083b755a5d2295f6edb4768b \
--hash=sha256:a48d62ab9d6f4f98c983223a547af44be6ca3691074c31cecced6facd3ba2dc1 \
--hash=sha256:a4f00aa42f75d6e4595e8866e748cc1705adc0cddfeb2ca86d0d03993d63ba03 \
--hash=sha256:a6e721d4b0e45d5b65e87534470e67b18dcd092c83f68fba09f152b9cbc061af \
--hash=sha256:a730a083190634c65cca36ba5f489531576ebd79bcd5c8e172130f6453127231 \
--hash=sha256:a931079504ecc49efed7744c476a5c343a92fabf66dec2db95edb1b2fdc770e2 \
--hash=sha256:aa9511c62d14da7aacc9b4bf51f3f697a621e83b2d6919008243c3aad168eea3 \
--hash=sha256:ab36d55f9ed2d067327667c2fea18dda018eb628dd6347aa01dda6cf1f5d3836 \
--hash=sha256:ad2c86c495b899d862ea0f4b42891b8713a3bd45dd4105c7fd51c2a72f39f3a5 \
--hash=sha256:aeae0e330c9f6acd681f647d46cefd30c29f93e3392882e792e82080c9691399 \
--hash=sha256:b0431303acaea1089ad4b3e9ce4e6518193def1118d4073ca848635ee4ea2e96 \
--hash=sha256:b5bdfd1c873d4e093aabc0ca84c4ca6dbc4f752afb5c86f146d9742580c9da2e \
--hash=sha256:baed1e86cc735622097354b9d1281406caf42ff42a886d29faa8e8d1630333be \
--hash=sha256:c1453022f490d2459a11819d83ad1d586e9ff65a12ac3e705ffebd46d3685dcf \
--hash=sha256:c26608d2222fb1e94487e4a387d85f13eb55d5ed725cb25a0c589ac4ee60e7bc \
--hash=sha256:c7659f22557c5a0bc4855cd635f55edec690cc008a40768527762cb9fb263455 \
--hash=sha256:c8c69575568085ba0b1b10c0249d779a214aea6f6522e949a0fc9fb0fcb449d0 \
--hash=sha256:c8d2c9fd1f2d16f780d15127abb050d13d1a76c03a4bd87d7e4980e45e511e12 \
--hash=sha256:ca82be1a1d406ecfe1d25dc16cb33488e5a16bf4438c9fb590484ea29d92478b \
--hash=sha256:cc572dace3f60ef98d7b12ff411d20f5362feb31a0439eab0085bbfd349982d7 \
--hash=sha256:d18e5ac0f2f03f4f518d3e23db0f0cad7faa1da8620e9c09461d443bbf6e6692 \
--hash=sha256:d28630f5854ab07ab1fd4aba756de52326c82e6be15d414b12793f1975048b54 \
--hash=sha256:d9c275eaacd24aa73f94ffd6de08fc3f932424d8b6c376f4bed7cde376fe7bc3 \
--hash=sha256:da0e573f9f97159390c89d9f1a9e41908b66d408cc5b58d08cf3847d844c531b \
--hash=sha256:dd31f52ea1086513bb9df30f8fcee9b8918323ae067a3d5b78bc826a000712be \
--hash=sha256:dddad92b554513a31f272570678ba307fb9f618f05e3d4a5eacafff9eae03e1d \
--hash=sha256:df423d40ee8654634421812bc3b196da3f9bd7d32929da813f8394c4348a5358 \
--hash=sha256:df913725b79db7bcf03448f36b7bf8815363417d5b58deecf9305e3e30f0f21a \
--hash=sha256:e0bcb7e0f677f543555d2adff3bf19c05f66cdb4796e5ff602442ab2fe3c4ef7 \
--hash=sha256:e2d65b31f36619cda3999b78b2aa9632e76b78448e7a56fc4240824200e7c4fc \
--hash=sha256:e6e8cff14d6fb0be70a09c0bdc58096f501952d04624ebf867e0e56da2df8960 \
--hash=sha256:f16c709686a78c727bbbf059f92b0bf41c6fc60deec706d2dc19f529175a6125 \
--hash=sha256:f24fb43132a4c6b4cb4eb029492919b2db645be6808d738f244fd146c03c32cb \
--hash=sha256:f53e442b08449d42821fa4a4fba000095af9f62742a500f978a9f557ec44339a \
--hash=sha256:f5cfbc5fe74540d335175b656c725d74d90e3730c626d92575eea35029d9afaa \
--hash=sha256:f81b3b8f3d4e343550fa4baa0e479bba9f2d29ce9c2e9b51d1ce1718d7442fcf \
--hash=sha256:f8ec5e643a9a937f64e1999eb9f75d072263751912dc5cd06d3c85f8f44be7c3 \
--hash=sha256:fb92203a88b3d3053034db775110081c49d28be6551923805e039924093761e4 \
--hash=sha256:fcd22650c908d7b7da162bbfaab594a1227a15d1643a98c68b122ac642fa2264
# via cryptography
charset-normalizer==3.5.3 \
--hash=sha256:00edb7682962c596f774bfa126e6b6f885b7af2319f448d327591c284a482de8 \
--hash=sha256:01b35bec964b92b89bdf94adf931d2e80a15f1c7b93bf850b4430cca23f7a2a2 \
--hash=sha256:020cabbb90926b2d8b022a5e057ab349f28844b61f34117323fc08c2971915e3 \
--hash=sha256:02b1abf64742b2d0782172cd2542616e462c201c829c23aff833390babe2967f \
--hash=sha256:06d07272f70d9880fba32d4876e966ae4dc9961134bc989066a0901509dfd8cf \
--hash=sha256:0810592b80dc5a97f8103443460264b588f31c6baa8a20abae7c683435d8117a \
--hash=sha256:085a5d1f49eaf96596d79494fcab18d9a32db6e345da15d6debfc90110b20679 \
--hash=sha256:09833ba78c91f0d1fd06387c69dae9f079428b77ea05eaaf1553eecead31fb68 \
--hash=sha256:0b3fc6f7dd9db4a7782e65dc98eb80b2a91a854cf54a03dd93649be2f7ca638d \
--hash=sha256:0c0fe07631dce6dae788a59c20ed927adc6feeb2d9ed440747eb367d89822a45 \
--hash=sha256:0ca25f1b1167e9fb94d93d3708df0b631de241bf8440947b0cb9f8c4cb66fed0 \
--hash=sha256:0ca2da4a505fae7ef95922f8d48235b2e49ff8f10f4edcc0481e5f6526ba3841 \
--hash=sha256:0cf4cb8d75090a8da3bd30c0963b2c6c6114e791c6fc060c3cef8971497b1f04 \
--hash=sha256:106b9d0438e2ff0a0e8ebd869273fcb3640af28323bba8651c714c57efb38e51 \
--hash=sha256:11ad35a0b856ad8bbd0c9e900c069461a4661694714aa17b6e6e2e8621e1c373 \
--hash=sha256:139aeb8ca63946dc79364c37f2c9cfe5c1b7f3882f2c47484d0e54bf14b921b0 \
--hash=sha256:1714ff1ba001da5241a585fbd17a7742a61ad34efb4be8404aca5679f51e53ea \
--hash=sha256:183aee7e84789391e547ec1609f8269332b9b123d21e97f7ef79eaa474c47e08 \
--hash=sha256:1a34385837db59d5de814c9f1e0f4157b571f9ce0eabdaeace410aa93bf5df62 \
--hash=sha256:1b2704f4651539eab50ba104a975b96c3cd5246011aa0755d2dd71ac12546644 \
--hash=sha256:2246873913d7db43ed5a3d98ace398b989b2ae20b77c8d761a7bef5fdb9bed42 \
--hash=sha256:249bf0b6f43985c33c83adbbab0ca71246ec24c82d960fa00c4ddb2cfed25db9 \
--hash=sha256:256b434b2860ef9da1cb6a5fd4ebb5d600936668e50e2035858948b96b068ecd \
--hash=sha256:26c6ad87bb79628954b52f8f7b9e18ab5cd9667546712ded9689fb7677e630d6 \
--hash=sha256:277b72183b96879887f0c3aa0bdac1fee08a6c7e67bad53145c4fd416d99dfd3 \
--hash=sha256:28ba8e6361e0f319641707484994096ceb77e05c29eaad2919756218c0c89001 \
--hash=sha256:28d954a437bfa5fcdfe7ad8902cf4347a8486f34a86c5f39003bc1288eb67d72 \
--hash=sha256:2978c799237eb66619d8951d2ab7efd317414cb6682160e05614ce1c8b5c905f \
--hash=sha256:29ac44f5878142128ffe4fa7e041ddc4cc5fafe43983245b9a141908c40b515d \
--hash=sha256:2a6f937e0b70133d1f826d0a253331b6fe1a4c874808cc12e16f2fb8177042f4 \
--hash=sha256:2b7797a5b0cb197f118fd13b41c14c5a3c38dd625a87c1da58a3066cf53254fd \
--hash=sha256:2c4e0050b732ee3dca3676a5f5cf7fbd0c131761c194f1bb1d24c055fad071cf \
--hash=sha256:2e7fbd98443f28a5ed8004f0b058edcc4720a3d344adf007c0b7f1adbff2f59f \
--hash=sha256:2f2d973d3c79fbd1066d63d1bafb2ade66934c0840ed149f6fac13c3fdf80793 \
--hash=sha256:323d5cf6df3ea724afcc3bfb07c73be06d2e8200a8b6b37979a300ae1e7836d0 \
--hash=sha256:326a7a0e3715c3ac24c21e7a3b831d6799cc795bff260aa49c23b69025852f99 \
--hash=sha256:34054580168b04e90e6c7c0f6c80173fa2d4f72c4db91c9095598454f96d6389 \
--hash=sha256:366f5efe95a6149ecbcebf779c2594a6a4ff6fc116402826c72ed0eccd6aabe9 \
--hash=sha256:390ef7c7e018c0abb8c0ec2d28ee137567ff50c3706facf6d115cac832ac993b \
--hash=sha256:39229c222445415db07a0be4dff8ad1addc3126644d7aa72d73f1575b637d69e \
--hash=sha256:396fdf2d4367674531a7c8d54ecabbc8e5131e3a1a06270285eb99f3140143df \
--hash=sha256:39e019884c8f857393df954d35f42bf99c5ab85af226fe74d1410188c6fec31f \
--hash=sha256:3ce4e4587e451ebc7d9899a7a1f539ea30a3c712d7bc8e0d256923c697fd5dcc \
--hash=sha256:3e8da696ef1935a019c10ec16555a062183ddf6d5901e296edeca4b2a8f84e1d \
--hash=sha256:40b2ba91f0851aa864994b3c7022e4d96d09026717e6a72e44410d6fb3a74a13 \
--hash=sha256:45aa4ccf5a6caba138dd0f8bf36fa3e26654585d534881b62ce5e4fea2487772 \
--hash=sha256:4831fb33e98e92140fa17d4d673a9f49f9c0ddd056115b722858793e4b86b0c5 \
--hash=sha256:48f7c7f537246bb3af2b3139f44716a30b21e78c2fd1cff0f3e392fbd55d8044 \
--hash=sha256:499e4bbeb1e79b14756311a1d12cb88112f244423e152d80981d9bcaff3279fa \
--hash=sha256:4a991dbd7aec868fe10802b02bddbf898173a47ba236f2d6afb4ab1f98243534 \
--hash=sha256:4ff5e27478681ef1b13b036baaf9beaf9b4c6990e903c752ad3b8764692c6d6c \
--hash=sha256:56405211fa124c393eea14b3aeacf5b90de72b1f69b0a60c9bc40b01dfe71a42 \
--hash=sha256:581d6e7df9b58d34147e21efde42a480b5087fe54f31e42550c26321566ba1e4 \
--hash=sha256:5970d148182b6b7c22b8290a81f02fb521c4e7aee6747743b3e645db58d5001a \
--hash=sha256:5f86753952f7de3abc7ce871f8239ce4e0d32a91c84d22f3a667e669907c3897 \
--hash=sha256:6118055f4ad0d94e016eadbb86caed9caf2c9033631ed70964ba631c1336984f \
--hash=sha256:61e32fdbf56f4cd25a1efa451c8b5fe886fc5e00143ccaacafdf21f301fad059 \
--hash=sha256:61f3258f700412c68fde407e7c749ed6930e795ea8f5ead9a40afddefbec12c4 \
--hash=sha256:6423accb6ecd1456bf824bbac98ba919398523a69ee5f1680dd1da88769de866 \
--hash=sha256:643724071b01cc0369026e259850791212cc187c6031d0e930abcd253f128e0c \
--hash=sha256:656b9744bac4493561d28b56d7d646afd7a8471254ef7004d849aa8368020037 \
--hash=sha256:6651fecdac146ecfa52700e02a5fa3b3677bddf5fced4983b43e904244de3f6a \
--hash=sha256:67bb767a8de7a2b1164c74fdbe5cdc32b9c15d7142efd9a6dc77ff63da94e846 \
--hash=sha256:6b702d36c565f6c650f4b479488f475b2982132ab8d0840d42b1442462c21056 \
--hash=sha256:6bfbbb9414dd0f5b81c259deb7e50b4b44e65e05879eee482351bdabed49d7f4 \
--hash=sha256:6c80b4e83e2fbddd25fe27804cdfc45ef71bb387522caa575af42118d72dc970 \
--hash=sha256:6c8abe7d59bbc891e5080b8b142c36db93154f840c4baf7c83ad6273a1a15397 \
--hash=sha256:6dde7edd9ba5005389bc7c0ab461411f281dbacb2b06e52bd23592eba42bb503 \
--hash=sha256:6eea31136fd924ecbb4e7c4f3df4b18230409629a22b3896f38a6754d5857794 \
--hash=sha256:70f65dd0c2ed79ea2d9776096e9c7d25e398c2c03eb31877753598d201d91784 \
--hash=sha256:73b4ddf1230df56c9e7017a16e3f5171b6ef0e4ff554a418a370d7ac7245bd84 \
--hash=sha256:747e83d415939612284afdc99f15295382639c0d3fc69a73aeb84b380d1f4af3 \
--hash=sha256:7a7e5bb8974842ad747d4a2b9fb928f84c3cdbe2c2fd7e405197fc1a1badaeaa \
--hash=sha256:7c313b46730b4a68bb31450973467313b2c496fefa42ae316b86c186cba74613 \
--hash=sha256:7fd816f466883dcaac196ac77271d0292eee4a81f4db1191b95d15328f335937 \
--hash=sha256:7fdd11094a0b07bce306b359fa7311c71d93466d967b3b345f2e9f03d8b2c959 \
--hash=sha256:806e72ebaeef54d7faa03414be9e8409eb3dcae49fba089d62063a60c0b5a4e5 \
--hash=sha256:81132eaffa984f0a399233df4cd383caad18e8cadc6c24c568cf9324732a9768 \
--hash=sha256:8231365b03b702b516aad35c9515694177ac31c9dc6240326f07308a4c45c708 \
--hash=sha256:826d82356907350f345cf0aa744d43a69ac7948bd60f460f997cde86928beadf \
--hash=sha256:84356c7b7ddf090e3e4692cb99fc820e6189b5f6662ca7e8589f41095cc8efca \
--hash=sha256:87d5a237d6531c654e7b9b319be9ba7e368665c466e02a03cfd4d3d77730782e \
--hash=sha256:87f7d6c595465a25d33fa3d5215a571a98c4cad00ead3ad18ebfb62adb3d3e6e \
--hash=sha256:885f202d6e4e2298bea9802ffc6d8c7dc45394199a8dd9e1492f05fe32dce311 \
--hash=sha256:8b969f0309de905101bc3d2471c112e9ccbba711a7590b12d51f372b4163688a \
--hash=sha256:8baddc6349faf49edae4d1322f12b681b9e86acacd01874457c997437ef4ccaa \
--hash=sha256:8c4dfcd3269f13dff7f29f9c332d54a4a21f17be818b49e769e111befd4d39e6 \
--hash=sha256:90b1ff6cb9c7a204a3b79b1b0ed6ac8a1d8fed3b6dc69e50ae5de0f358ee81d4 \
--hash=sha256:92bf85ecec3ad6374ae50d870bd1deb34de12bc1158b5fd09036d4c435c6f58c \
--hash=sha256:92ddc32b6a1508ea145f4f7995e00666db454b8fd3e2cae6c2ecbde4f4d44616 \
--hash=sha256:948fb3649416a70bcdbb267d79c7048e8aa16e989ab9da09f416e67cdd3d6b8c \
--hash=sha256:94b595e64bc2927f679774de50df340b7828dc1c07c99149ba7c2d0828dd8bf3 \
--hash=sha256:94c9d5d91c16554f6397b823d9e47181ba100d830ab16b5d720adc229e17b2e2 \
--hash=sha256:9510da88bdebc903be7844f31523ac8d7b3f63e167db54b6045104a2354afa6a \
--hash=sha256:96387278c3b17bc1170f80693398d0babac7b41df128ced8e27588a7155d95b2 \
--hash=sha256:96e268b0cbda016ac519513294fcd17032264085b600abaac58b93049477e132 \
--hash=sha256:9902e80096a94cf70fb72d12ae40e3b187b40e96fa722873d4d62afcd0333c46 \
--hash=sha256:9a6b95b1737f9b5942c35676c52db0c302d60fa806efde3fc2d9f54247ecf4be \
--hash=sha256:9b887e8a7103ae2171dccbab00a4bb2bf1560f5c10c28227e5513bc90a608cad \
--hash=sha256:9c1bd8321a840729a6b2620774cf4000fafe66c54cac9064972a10c4f607794b \
--hash=sha256:9eba4613d45b49196af04a5cbadfc5e9379ba94aac85184b72cb1107ad31af0d \
--hash=sha256:a094178c51530c9ebd1775e72d160af0eac4be244fb06ff1b6f182128c71903c \
--hash=sha256:a09ca76391f6e17b12d55c1068b4b5f8f6c9b44b432d936075372fa12782292d \
--hash=sha256:a250888753faa289e2997962fbb17c4960cbdb58575533ca6fceee68c224bdff \
--hash=sha256:a312fedd182357f2c22f066d17dcd7413b6a205ee3d063d36950e94e3019d3de \
--hash=sha256:a36bba41dc7fd263417688c4daf95a1091f93e1f6957c0f71ad7798907c5a10c \
--hash=sha256:a3f4044dd5d2f7b958be6b9903cb432e6a0fd944d673707ca5cab68137d0592c \
--hash=sha256:a43831574e14423103d69fb1357e76e4f2347041c98e8357ab88ef21812e80d9 \
--hash=sha256:a491d4afb361aba32d55d7df7ccde766a3aa9a34c002d2c32c2743bf6e77c13c \
--hash=sha256:a5a7e0326566759f9a7bc44f4b9a179cc40a297e09e759b0bc7c848c06347527 \
--hash=sha256:a6eba94fc00d899f8d268712772c8dcafc40215aa9b51701a397afc9426e012b \
--hash=sha256:a8f92cc9080bff47555c79b88e7fb8655438ce3bcf29c5f01ed2ed5efdf174a4 \
--hash=sha256:aa2476abf8669be493689634bdb79f468a6fe57b005a5126db7e9f61d1954fe2 \
--hash=sha256:aa8be1f24fbc03a07cfe002b70ba0716effc6b3011fd9e5560ca399d3d0605ad \
--hash=sha256:aa9390d89822dd06f9920ae3038819cb121643a72f4753b2eee1a79b2f1215f8 \
--hash=sha256:acaa0e100f39287dc5d13de96e33ba0786f1cdfb5b4ca28918913ab0eec3af72 \
--hash=sha256:ad1becd776f5a41a4d91cb9ee51778f4fd687ef15e4919779e00a33c6cff6948 \
--hash=sha256:af217012cfdaf6ea5dc0c538aac29b7bd030eb865056cc60f1d973b982b7917b \
--hash=sha256:b013417037c931583578639cab2523d5a2efc35a584c192d07f4c909b133f6b0 \
--hash=sha256:b0aa6b81bc632af7cac7b270c933298cb5ee858506dcf344e0da006667e0c351 \
--hash=sha256:b30e5496e453ac971bb17f5e096b84fbaae16d09e2613f6148ff528c08a54a0c \
--hash=sha256:b66a0e045cf859d7418f26a554509b65f21ebb6d90a95152460781939e8264f4 \
--hash=sha256:b6dad86d938104f9d43404029e5fc8392f82762d171933be4f192a6008bffa53 \
--hash=sha256:b6ea5bf7e3c39f6e56957d82274ac7cfab469590085883fdbc86e754cde76b11 \
--hash=sha256:b8fc4fe56992b089d6177021fe6db641321bb2bc2fc7a1abf815c29a80ca2137 \
--hash=sha256:ba26e4d073a4f7f2594676f2ff20ab80a7f03332b81c3f9964e9e53bf2305329 \
--hash=sha256:bed05639ae1bc23df7996a4fd13ea5064ddf60dc7dabd754f8badf060daec63f \
--hash=sha256:c08e06fc69750827d7ccebba63ebc97a85e479cd5c9dbdb80f5e08a77b774fdb \
--hash=sha256:c39a4fe28a16e8fa667c55c154f62c6c3cd9ca2491cca9f16330dd7360d05b76 \
--hash=sha256:c437ed8775d201d37206f37d233f547506e3aef60b9711584c65444c686b4905 \
--hash=sha256:c43d9737c3b85ccd16b1862b1e7aa5c4bf30a6033068403713c0a2bba5bda979 \
--hash=sha256:c9d1f467d121b33b06865c94ed5ed8388a9ef76f5e1acc1c8a854ac653493f5d \
--hash=sha256:caefc441edff6070a9f9749ca880a22731a1715d9e74b24304a546eec44bfc16 \
--hash=sha256:cb18428af7399e0a6f7e3b45f110d57a1a47cf07fd4b3ce50e2366d99a38959a \
--hash=sha256:cb4c25a9d3410262216b5c7447e51bfd2de0efae0a7640772dc6d2a8741590de \
--hash=sha256:cbd09b22b340f846671e79e8d832167fac60c1884be4c71fd667211486a3b58e \
--hash=sha256:cd5422fd4f8a7859846c9289e310dd95c0d1890c31819667942753e510f88f69 \
--hash=sha256:d12571adb9ceeb9ba0640db46433430062f5f1dec89e39713a2a5a8ce3016c37 \
--hash=sha256:d1b7a3fe4cf679eb3870b91b86b8ce12cacd5cf4d74bc114864a5cd65319ddac \
--hash=sha256:d313494077f849d8199f36166947785da1eeb36335fda15fde2e8f801ef271b6 \
--hash=sha256:d3c9d5284d64f4c1015d95b751577b260fd6d14e3f8edf21710f4436e7ac4c49 \
--hash=sha256:d4e7ecaa25f0dae672ac783c2e5aa9054a62e011749d64ff47b887af360a3e82 \
--hash=sha256:d57f1b6affc3581fbf0bc6d783cc60e7c9957adfd9c7b89f8a9f3573ad1cd49a \
--hash=sha256:d8f85e019c9f08ec134648a378ddd3f6f073c1e4b5ce9bdacd9a9e7b60749cd2 \
--hash=sha256:d93403a13c8f6f2d027185d90ab695e81d95e3ebd000f0078e201a1c3159d4d1 \
--hash=sha256:da606e3015dbd4b9a31c0468898a0c4c998846197ddfda78308821dc8c9e9be3 \
--hash=sha256:db2eedef732424346f98d0aba5c6ad688b648bc79847f4cc70dfca830130b1e6 \
--hash=sha256:dbdd407104ebf2360464ce02c7933c6ffac58bd5b64cdf6ef7dc0e787e782aaf \
--hash=sha256:ddea089587432e3df6771a4a405ef249cc9727f7becb1de3f00ab571b2432002 \
--hash=sha256:dfbde696fb427301ec40cd82b8eec0b528e44c6af8239f33ede2b2552d9a085a \
--hash=sha256:e1cdbde56f9fa6d426b78941c381e2ba160c1214809baa47e02c1d0d8881d598 \
--hash=sha256:e282983b8def5ada758fa1f18bf9060bb8ce6cdd73be32f62a2de59820d3286d \
--hash=sha256:e34f591669498a03cd70993b0a79b9f0ef40c4e6f8232466bac33c42f0c15742 \
--hash=sha256:e405cce4170de1fe520d9a92de9d7ececc23dfcf6888c62ab608a21be50838eb \
--hash=sha256:e4a0f2adf29a69dd8fe58e42bb191f3c87067b05fcc63279983e8c9ce5092abd \
--hash=sha256:e4f85c34f9be32ec5568a0668fb8bc029d3e729285fb8fccc38695e185379a9b \
--hash=sha256:e5e4785d8a0adeadfbdf75f4efc357911842674651cbafd7e97f69b11ec3cbc6 \
--hash=sha256:e86a27ab632d2e888c22b79263864eaff8b7dea9e87328a9bb0ea04eff24786f \
--hash=sha256:ea880ae1a692ae694c11bca7be74864614ff1a58bdfff4605f36d1956b4b1588 \
--hash=sha256:ee9de080e8d6221bbe4ba2667367b1cee0f47a53f60ffc5e431b698cd2f2b214 \
--hash=sha256:ef8b925f2b331a1f17d6fb32625e09fd571cf41844f578379f934dab0067cf0d \
--hash=sha256:f06e257ee0cc85a7e4ec44f171ae2595fd901c34212f3c9e7ab8fd8621401e99 \
--hash=sha256:f1214052966421a88ed526ba93e4463b39346862fa4721be5306434b33dae795 \
--hash=sha256:f160f03e15bd1e3c35db9bfc20c42ff83155d37f9b0c79806cb10051ca725f13 \
--hash=sha256:f1b357340e4cd29011683bd81226175611ad835fec22e5b7df83b96701571226 \
--hash=sha256:f39290a0c2e3f4196563189bb45e6ef5d5badf50864e1bfaafa9003f0595573f \
--hash=sha256:f5a5c311e5de6954c36230a37863b5ca58ce232589bd637ad2881c4056897b12 \
--hash=sha256:f7a841170fde40b0e1345884bee09ceca7db49a9291fa340089bec66a366c243 \
--hash=sha256:f7fb9a3275f1a1528e542a0f5a3d2c89fcaf68e797fc5c6530434cbd92a852c4 \
--hash=sha256:fc540d1618c5638fcf5aea97060cf011467918b010bf682a84ecc0c9474e6cd0 \
--hash=sha256:fcb17f1d40c38912a2cdb56ea47aadac3527cd0b06fe24f3a0c4896febbea063 \
--hash=sha256:fd0341b9dea133d187d7c5a2cd7e21ae6449a7b68ea8c2454f9cf77def11ec1b
# via requests
click==8.5.1 \
--hash=sha256:8bb5376d2006950386f8c6427613334a2acadc5f559cb80e638d00b4df957e37 \
--hash=sha256:9bbfada76703fd1d784b83eea012e3e8c6a001a876543ef104fa56aaaeb072b4
# via molecule
cryptography==50.0.2 \
--hash=sha256:0ddc924c04591c2811ca024d62ecad4f7f6f08af8939c211438f48a16bd23602 \
--hash=sha256:0ec5f09541743261e66e291b4a0cbf0fb2997aeaab6d9e9c740b9dba1b58d1c2 \
--hash=sha256:0ecbc5652bdb6fc9eaf89a7d196e20941adfe812f43bc4ca05d9150496821047 \
--hash=sha256:1981f1db4630889b9ef7803fadef12b056f428cb6b85c27ba57b774793b6093c \
--hash=sha256:1ba34f04897fcdaa73f74145c25f3ec146fbd56593853e88adc2e811303c5f42 \
--hash=sha256:241449bf940a5d27309bd317e6f9a2af6932113818bb2b8f5c59ddc7ef16da18 \
--hash=sha256:25784ce8b9621c90c643efb9e1e2162ab3b0224cae446ad5e70e7fcb1ce18b51 \
--hash=sha256:3dc4fd8058cea1644971207d530e1a03a184a805ffc8ebdddf0599d78a331b81 \
--hash=sha256:4061c0079120205fb760c58acab6443e217307dcf05e3702cf970e0689972856 \
--hash=sha256:4a20ce1e5cb4284a86692fdcba7cb8754185c6b2e5c56fcef3751cf451d3cdc2 \
--hash=sha256:4e81d95e5bafc2d6e34e4bed780e53e4d5b9a2f928573428aa4d35fbec1eb0de \
--hash=sha256:58a0c478eeca76fe5e07993c5a0703def34a6dc6a0cda4f5564639b33112ffe7 \
--hash=sha256:58ddb5a8e3179d12f19e4ea34d2d32e9d63a4baa142c875c1eb59f41b7243acd \
--hash=sha256:630ebfea3bf689d075f82316324ff7433dc447fe6bc1bfc76524b74b4a9567d2 \
--hash=sha256:6f8700550aa1474a91e5dc07049c46f98b423b5b1ddd0483e0b51362eeeaf5be \
--hash=sha256:78198641e5be9521beea5aa782bb551a58068d10e6eb04c9c680c1b69f2e7d45 \
--hash=sha256:79def8d059362e7831389ed3be0ecdf58a89386e1271e35dd9f5af84e81bffd0 \
--hash=sha256:7a8701d6b584d76e909e3d305b7d126b41439876a5aaf76cddc67fc230eafa2e \
--hash=sha256:7afa5a6602a9f29af1f3a2965f831bae7c9d5d597b7cbb716d41ab3b7d89879c \
--hash=sha256:7b46165bb56eb4704e2eaaf86f3c940d19154535d9b0ca7d6d590b04060e00d5 \
--hash=sha256:7b75de3c8b3be1cdb1052747c929440c3eea46c1bc2cb8a6e3a48388e9b7b452 \
--hash=sha256:7c6d0330c472d96f6a6afe24d80dfdf15176c33096f0a4397ae4c60f3dd3be48 \
--hash=sha256:828d49b0ff5a0e3975865571c5d91dbbdd0d38d8289b249a163e9425413a5e05 \
--hash=sha256:84f964e537f916e2cc85199e5a88742e964939b575ac8598b3f9d6cc416cdaf1 \
--hash=sha256:85d0d9a31b9098e98534226d5686b47264b95e62ce459dc2e62fdfc809f9fe93 \
--hash=sha256:87e9ce85beb6b328ba370cc6e6aea483c92617b4c95b1d33a49297eb662bfb04 \
--hash=sha256:8c71ba2cd31fc93748c38e1b613200ff1c2665cbfd5341fe3a61cfde35a1430e \
--hash=sha256:92e665960f25fcdc73725b9cec7a3824f279ba97a98653afe9ffac2e43668f67 \
--hash=sha256:94e5e9f108ee10471288214d3d233fbfbb492840a8457eb85178d643ddeb32c7 \
--hash=sha256:9c8402a82ea0dc4ceeab793db05f0fafa8ca139ca34fcde5df0f596103c74107 \
--hash=sha256:9dab55f57c74c3cad24c323bacbbd04be4705ba6eb0d92e920b1fc4837ed5079 \
--hash=sha256:a582ab2ae1d34f67112cadc86702774c9ea4374df6bca6afe672817203c99134 \
--hash=sha256:a6557e5f38e065ca9fbdaf7cfc7435ecb1d113aa81a022d1b51921ee7432e227 \
--hash=sha256:a9f7355e6fab51f6c369b86fb7571cffa05edee2c2121e0380a37fb9ac1cd5c1 \
--hash=sha256:ab50ee449bf968271e820086f10a33d101dd060370abc10bcd22279be2656539 \
--hash=sha256:ac9ed99d81760c62fe89d5f0815cdfa1ba9a35141cf30f1c2d044f04b4803d2e \
--hash=sha256:b13478603dcd0a2479ff8e87e2c19a7d525734686fe3c49542472293a204212d \
--hash=sha256:c423ab384a46c4dff7217b2ea5ba2e11cffdeab6441acd04cf65a369caf0366c \
--hash=sha256:c5e67125c7dca78d199ec4e116aa93dbb83494808ecbb8211a2cb09b1bf41dbd \
--hash=sha256:c71be1cbfa5cd9a41ee452acf1eccd82b2c05950358b106ec8ceb83411d1a020 \
--hash=sha256:cbc8738fd8526d80f35cb3a40d41f41a2e7030bb3b18b09a6778ef63d291c2fd \
--hash=sha256:ce47f66801c20ec6c6632453bb5960fe38939e9306970b48b3a5a26de7745d94 \
--hash=sha256:d370b8d1dfcdf7130178137f6fbee6140774a1acc6cacefc4b42643ec11d0a3a \
--hash=sha256:d38cdff612d06fa6a32840d5e1b1f7a27cee4a349aa9085d94a67789d6bfd408 \
--hash=sha256:d8947001be83df1394050758ce0e745dd74fb134eef0a4b5124208dfc3a68c37 \
--hash=sha256:deb9fde5c60e437ee4821bc9bc39ff31b42135c27e1dc61ef0a629389c1de62e \
--hash=sha256:dfe9763530994147d9af1def057a5b9658b00e8f8fe8743d144d1e0911c2e454 \
--hash=sha256:e105ab60406787da31fccc883fc0f733af1efd78f0136a4599692c4083a73d0c \
--hash=sha256:e275096ea1e60cc595cda2836fd4a6c725d1125108b868be17f53684d164e2cc \
--hash=sha256:edc3342adf8f697fc5f59c887a304356f147b397809440ed64e2fa6af2f50f37 \
--hash=sha256:ee247f5c245c9a2fe7c8e2214e295918838e44e00a45a6718451e4004219e767 \
--hash=sha256:eef4c2f3423810b3070ab391f85436d2f8bbfcb286ac15cbc73190b3563b1f1a \
--hash=sha256:f21e8a22c8605750c7af886bab299a363721264061b4ac0a30efb73cfd58efc5 \
--hash=sha256:f265528741e048bce55c3463ed721fb0aa45a5888d8add8cfeccb3035451bbdc \
--hash=sha256:f2f9bd7f90c64fe89253f0a2c05e3c4856072660429ce8831b4235bf29403a67 \
--hash=sha256:f785f6161f202ab04d8ca194158968798e480ca058943907972da5f12e2881e8 \
--hash=sha256:f9f6143a8c75945eb960d9eb98905a441394abfa24afaae239d514ffb2586480 \
--hash=sha256:fa8f5efb344d6908a1ce62f4a24e2e5780f825d6f53f5f50ec5ffacac72936cb \
--hash=sha256:fdd28f912fccfec1846a94e2e1e8f9b0012f557f0c46fe4f3eb0d7a87afcf90b
# via ansible-core
distro==1.9.0 \
--hash=sha256:2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed \
--hash=sha256:7bffd925d65168f85027d8da9af6bddab658135b840670a223589bc0c8ef02b2
# via selinux
docker==7.2.0 \
--hash=sha256:a3f45fdeb9165e2d25d9a1d02ddf3bc70fb572cf5ebbf9b58558c22caf29b71f \
--hash=sha256:cebb93773d334f778e023a7ee352a8d6e13ab1bd3b863a4d4a59dec897df43ac
# via molecule-plugins
enrich==1.2.7 \
--hash=sha256:0a2ab0d2931dff8947012602d1234d2a3ee002d9a355b5d70be6bf5466008893 \
--hash=sha256:f29b2c8c124b4dbd7c975ab5c3568f6c7a47938ea3b7d2106c8a3bd346545e4f
# via molecule
idna==3.20 \
--hash=sha256:a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44 \
--hash=sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c
# via requests
jinja2==3.1.6 \
--hash=sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d \
--hash=sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67
# via
# ansible-core
# molecule
jsonschema==4.26.0 \
--hash=sha256:0c26707e2efad8aa1bfc5b7ce170f3fccc2e4918ff85989ba9ffa9facb2be326 \
--hash=sha256:d489f15263b8d200f8387e64b4c3a75f06629559fb73deb8fdfb525f2dab50ce
# via
# ansible-compat
# molecule
jsonschema-specifications==2025.9.1 \
--hash=sha256:98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe \
--hash=sha256:b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d
# via jsonschema
markdown-it-py==4.3.0 \
--hash=sha256:7aa1511a46c39138de78d9eba92ce47e63124d8003fc98b3a351909e04239efa \
--hash=sha256:91a58fa5b72c71a40cf7177250fd767480d7a2bb3ac426ccfb76fb90305fdaaa
# via rich
markupsafe==3.0.4 \
--hash=sha256:007e1ffd9bf65bb6ee96df7b258fc632a4868dd5566037986c64781f35a36e98 \
--hash=sha256:02fa4acbc6a3fc5c693c34d4dd8c1130b7fe99cc915181b0ddd6f72aeb296002 \
--hash=sha256:03470d1a8268e692ecf79ecd565593e59d44219377a7ead61f1f1b94c1f7ff6b \
--hash=sha256:04e7902ba80ee4bac1d50a549606527a1dcf0476cd81403db41099d3b60ec653 \
--hash=sha256:051417f74bcaaefa316276e0ff723f541616ca51043d070da00249d9bddd3e3c \
--hash=sha256:05295589e619b9bed252a86b532b8e27350abc372d18ba89b59375325e91ec1e \
--hash=sha256:06de8ef6331f6e822c28d577dc8bf43fe398800477c49498f38fc38b67ff33fc \
--hash=sha256:0764a13d34cae40db7bbf3a09b7e9b491bf4603e20b263a7a9d6b8e324975d0a \
--hash=sha256:077293e425f28ec737dbcad442a71752e28f8ae27cde3d68acd1fb212091cd92 \
--hash=sha256:0930db9bdc62d22944e10b066448bb65dc9abe9112880c7cab8da54db4284d5f \
--hash=sha256:0cee7cb0f9a1b6892ea482237d9403b3d1b4603aee057d0ff01f0fac2d019a97 \
--hash=sha256:0d9c47709875fdb321452056622e930c52afbc07a7d780762fbb8b4d91ce6fa4 \
--hash=sha256:11935df9bf455ed0c04eb87bcd720f02b1fe5e02128a9430f23aed6f93336fc7 \
--hash=sha256:12a606a492de952afcb43b59a14aaaaad120e708d3663dd0fdf2d738d427a691 \
--hash=sha256:14bd2d845d62ab678eaf81da89d7b621b51756c72346745c1a594c09d49207a2 \
--hash=sha256:15ba9e28640feef770374b116a6f019c21f52404aeabe516aa7f800587b98cfc \
--hash=sha256:18a801868a884f216e784d7d14db2a4077143ce7610440aee2ce8f734e7cfcde \
--hash=sha256:1c0df495a977d10460a94941799c72d5b5ab03d3858d949b55b5a66c8f371c99 \
--hash=sha256:1caa2fa5a6184fb233153b35f654e6687bd555476f6170f29d8ee9be1a8b0af9 \
--hash=sha256:1e1451fab512d1bcc3dc26988ec1edb0b82c2db909132872cd9356070a6b63df \
--hash=sha256:1f1f9477e174582b0a1b583d60b66e1f2cf5d3fe12cee985e4aedf44766600e5 \
--hash=sha256:2628d3a8cb648ecebb3c5d6b0a1052d400e4d8b7ac0fb786be8d285b50040d17 \
--hash=sha256:26e9867520db70d37f7fb421a7f0d8adb40171011fb84ce869afa1a83370dfa8 \
--hash=sha256:2a6ef68ae94aed8721934072b27a3b654ea2100b97e4ab864cf1489c90926fbc \
--hash=sha256:2b2b1e18af909b448bb3cf9e3433366f7a8726271fc214e8b10e0f62a78c724b \
--hash=sha256:2cb3dd71fc6be918ad4264346a8ed69485f9b7ed7bf35495d8e22807cd6b8bea \
--hash=sha256:2d1b7d9308288661f56672b1b157d75fc536714d3638487bbea17b6318a78248 \
--hash=sha256:2dad610540cb2e6272855c178f08ae9a1c7ac258a7fb71660553a5f104b42741 \
--hash=sha256:2e5a7cd7fdd14fcb1ae5d7d8bf23d24fbd1daefd1fbca2580132e1ea75f098b5 \
--hash=sha256:2e9ad7dd851bf45fab9f75cbff4cb493fee9979e8d8c7c9c3ee119022518edd6 \
--hash=sha256:340cbb1957ba99929cbf19a75626d36ba1ae21d1730b287d1cf7f824a20c4fc7 \
--hash=sha256:34bdde374c5932765d7dc685c4a1d191a3207852d67e8e0a9eb6ea85156181f1 \
--hash=sha256:353bd63081912ab8cfa6a0c7d185934cdf8426f04c618bba6bc4b394f2069b67 \
--hash=sha256:387d8cd30e69b3f0a72877b9ae717033396404e19095b17fe89753a981fda44f \
--hash=sha256:3882fb412298575bae3b9c46868251f15cc69307359f87bb1b382e53d6e5a2c9 \
--hash=sha256:38fc55594dab834470b6733dead2ee9e3f657fb0608c769dcafa0ba5ab52f45c \
--hash=sha256:396ec4e65cc889f69786b3b89478b471cee5a3bcf468b9d9bb03e1a30fb291fc \
--hash=sha256:39dbacefc411633db5b4378b066a9aca70a3d7e2922c9e578d825f844026eeba \
--hash=sha256:3a93d9616ddecfb393727a0041a562cf0b15a244e20f2bd25efc7949be4c4f17 \
--hash=sha256:3d23795802fc8bd72534836d64489bbf0f67c088959091bdb22e10735a5107bf \
--hash=sha256:434139499bb20b502ed3baa1f169e618f924a97e7a777fea1a49446d80106cf6 \
--hash=sha256:436e3ffc6310d3c41878c601db29098102fe5d8a467c49da4a4125254e0980f2 \
--hash=sha256:489505b03f692c3f376394e49194fa7a7f9e8558d6e293a7056a0032b0c38163 \
--hash=sha256:4a540e2d3192792fc84eced57bef37851ccb2b41f73291bb17408eea77bcd278 \
--hash=sha256:4a7cdc2a420ca01058182da4253329764d4bfa055564d1eced90e6ba1e8b1d3d \
--hash=sha256:4bced6e2a6dba6a28f7dd3c6ce14df1b2dd495923f16ea484cad03decd463b2b \
--hash=sha256:4cf3468d5ec187ffffcaca8e61929a37448f215dafc1386a12c750a72fe53634 \
--hash=sha256:4e2c4809c14559aa7ef426f27fb35afbb38104c349a903bf8f3600456764bb38 \
--hash=sha256:4ed644d75aa94a2baf7ec3a96eaa160ea58c742eb9d27c6506053c5c40fc84ed \
--hash=sha256:4f6e0852a0283b1b1fd776eeb7b766a5f440b3e2bd31ab51af3b400585f3965c \
--hash=sha256:5066b244f576f91afc8ee3ba029a89f99d39c79b1853fe9d39bea9f0afbec148 \
--hash=sha256:5086f9975abb1ab531ee6afca1761e4b59a19b446f3f6522ed776963228cfe5a \
--hash=sha256:50b5bedc9ed8a94fc8857a42ef4f84a81ea88f8d4f05dc8705fb23ee6d8dcca7 \
--hash=sha256:52704c5d36eb6dda8866493decd61111fff86244c9b1ad225ca01b9e91e5970f \
--hash=sha256:55ffd6ce583d97dc71dc92e930324c8c0d25aea7e3ade6ae54ef77cedb096811 \
--hash=sha256:569d65055d367e3dcdf30c3f41119467b73d9ee9faf332bdf40402644f5ac08e \
--hash=sha256:57f9947a7e57a081c1e3e0a2dd0d2dcf290a4531450e6f611e30084c222a7295 \
--hash=sha256:5989cb26b2e1efc6a42216a9f6b5ee495ce5ace2e5b352a9af489976b32d1ee2 \
--hash=sha256:5c22873ad1f0532ba40fa1727f3c0fc1bbbaab6d373d4cbe3f0dc74b2e2521c7 \
--hash=sha256:5e8b3d0b18fd623afa12ecb2ce8d8becef69f9b5440c6330c7972200e0bb84b0 \
--hash=sha256:61631e08084be9e21a8967ec3139c7616ed7c5e9368e05c86d1b39562c8a57b6 \
--hash=sha256:64511c54db4e4987aef4c41923235927428729e8174c5dba488429be70a998ed \
--hash=sha256:6669c1bf34080161ce49c589cc512ef24d4c704ac9d2b2d3667f519c60418378 \
--hash=sha256:672d207103e6b16ca098611b0f9efad6bc00afd47c03d6ef62186495ca677dc0 \
--hash=sha256:6768d67d1bce64270e0fdc2e69309d68b9b18ae56ddf6c711d168e9d051c2cac \
--hash=sha256:6a45c3d514f2436064db00d7fc8778d888f0236ebfed649b53d13a59e69ad51b \
--hash=sha256:6bd9e1788e15bfcf6a9082de42e30387e7b85d211ab21e57a939bb8cfaaf8d96 \
--hash=sha256:6d2a9efe686f9de00d0d1ea32a4a5a86d558a2277501bd78d964214eab625e59 \
--hash=sha256:6da83a088f8ef93b2d483a8232a4dbf4d69d3d8496b568a03c56becac43e1808 \
--hash=sha256:7018d4af1cd272e847aa5917983ab5e83e4f6579f9dbfecd4a79c0ca80b144c2 \
--hash=sha256:71f88e749ea29f67f21f3b36433c1dc54c7729ed2a6d9e2da2e0d9e0d7b224eb \
--hash=sha256:737c9c3981998eba27f11786f84fddcbabc74068b72a4a1f454ea02094b57b65 \
--hash=sha256:73e77980c7207854f00fc4e71fb1626868d5740ab4012623d55c7a99ad122a72 \
--hash=sha256:799c39bdf5e2f1292fedd3009f7b3c9e760f10b2420cb9638d56920840ff6db8 \
--hash=sha256:7a83aa6e4805df46fed18e989d3d16f86ef60cb50bbc8d9ce3a6be89165fbf6e \
--hash=sha256:7d3391b2188d18737cb2fa147028b1096236eaa7e156446c650a489fa2cadc91 \
--hash=sha256:7e1636da3d8dfc220b6dd10264db5f2b165e4888c4518594898fbe381049af8a \
--hash=sha256:805c8b84534fa10891890f0e4be39f3a99e94615d93e8836bf9fa1fdca2feeb2 \
--hash=sha256:811d02d5122171c1941357efd8f9bf4ffe907b7f0a1a4e729a880e4be3f46e3e \
--hash=sha256:8138eb83940ec7299024d92d4dee45f601b9e6c5ffde9d25f4e35e326203c707 \
--hash=sha256:83b3944fea42a8400edf92fd1770fb8d0d4f7de651353bd2d8525a92dba69a21 \
--hash=sha256:849dd2bb0e5e4ab2b71c7191726a4a8d5aa8a610daa584728cbee0b710ddc4ef \
--hash=sha256:8698d70a8081ee8c090dbb394768b5789a1da8b131b5499f89d071dd3cfaf6be \
--hash=sha256:8781a792a070cf2bd1b86d3aa943894115faaba6e88122a7bf32d62072742453 \
--hash=sha256:88d59b473bfb03259722600839af9bbd7fa13a2eb514beefeedb95997882f69a \
--hash=sha256:8909c2f1c6dd65e054ac4b573a91c8384d1492281e55d82d159d653f7a13adf6 \
--hash=sha256:8965520ac587c94a4ac48b729be3d8b8de00af39699b17585dfb599babe77977 \
--hash=sha256:8b5d563170ff8ba3181caa967c99a3c804d1dedb702c7cb93a6a7c32247da978 \
--hash=sha256:8e124f974786f831d6043728e38296969d3579db8896fe004682f5758e613581 \
--hash=sha256:8f0fac8b13d14bb06c68195f849371924ae53dd7b1c00fed24650f704383b692 \
--hash=sha256:9240187afb63d2f9ddc3e032c670356fe941f6e20662ea168a5dc3f1f317e1b3 \
--hash=sha256:925f929d6b59a8b3f8b8c6ac363cd0af7eecc81efb3071770b3c6717c450a369 \
--hash=sha256:9348cbb300d224fe3b89793262cb093504d4ae927004468463f745188a193e4a \
--hash=sha256:9388003072b95f2f1e3fd908604194d653ba21330d811961a78b7da1a77e9e36 \
--hash=sha256:9438a2648b2195980cb2dd8e53ed7b8df91319e2d0b70ae61a9e1d1bc8d3bec9 \
--hash=sha256:94e4c421742086aeee4c32a506eec8859d7634aad943f7e6aacf70f813478768 \
--hash=sha256:94f5407f7bc64fa6463906b896f9904beeeb7dd8dc116ee8e9056c8714ff9916 \
--hash=sha256:971a3bbb75d97ae4e2e8f7d4834236f86f85f0c85e04ab2e191db1123b04f80b \
--hash=sha256:9e227f3dbe6bde7491cf0a9965d00b88c6b1a4a95d11480ddf88bb96d397c19f \
--hash=sha256:9e25feb9e330b63edb0278a0acdf85e50d0cb0fbf49c3084abbe4e24ae195346 \
--hash=sha256:9f098115c247e11d138ab83a28fa0323c77015007ea2df73ba5fd714dfefd67c \
--hash=sha256:a18f38cafc329bac5e3c2b96c765b4c96d3d103421ed22ab7988c1e3fce27464 \
--hash=sha256:a4bbd2d87dd233b9fc5812160c3d0ffbe42edc22a26ce0469f58479ede633fe9 \
--hash=sha256:a5fcffb37e602b0b3c1638a97746b9b96125caa9bcf6fa41d337a9261de231ee \
--hash=sha256:a8e9f292fcda89b324f2f5c91d13f1424a153e40fc2756f38ee23b15835ff300 \
--hash=sha256:a9f54054101545a9a9cccefddf54316aa6e4491611fcbef9e91b3b6bebec04f6 \
--hash=sha256:aa2c838cc024642cc04c6854232f32b43e5e22833dd11119c1766c7873b8370d \
--hash=sha256:ac0c7c9f1609b0c4c114feb1d7a3409564c7fb77e360bed9e97e5d25dfeaf868 \
--hash=sha256:add96447a86d205ab616665d53b2950ee81083757f56e6ea833c8b2917646b46 \
--hash=sha256:ae9dcb8fbe244cb82f8a6458b455b927a03685e383d9bacf1ea5ce180b96dc97 \
--hash=sha256:b4a635a0487774f841cb1fb62e907e7195cc95bc761e053184b8acc3ceb20733 \
--hash=sha256:b4d12837e0203bbace818ff4a7461afdcd78bcd782351cea148139180d7bcffe \
--hash=sha256:b61687d0828e72bf5cda24a2690188f37170bd31c9359ac97e4e66569f120a16 \
--hash=sha256:b807e598953730f82e4eae3bd30f6a122cf6b31c398c6b504c0e04c13c170429 \
--hash=sha256:b8cd1f918b26fd7b1832ece557cc18f2d8747309ff8b3f0ef9d4250c5ad67a39 \
--hash=sha256:b91cc9d336957239ff200f30097e6fea2dc6d6fb3c81e853eaa09eac904fd894 \
--hash=sha256:bd3ce56ae2cbae3ba82b683bc425cd7e48d2ed8b10f3e818186b6f5646d9271c \
--hash=sha256:be6cb0c799abb0e2ba3e618e6d28ddddf7e485f6c2ce938dfa237daf3905072c \
--hash=sha256:befb4158af32106b9a93db8d6d1d1cbbd418c0d5aca0cabb7b1780abf0c89169 \
--hash=sha256:bf053da3c97a4bc5ecfbb218cdd2983febd91c617be8367d139882aa11e490aa \
--hash=sha256:c02e8f18bdedba082cef725942ac823b9b60656db07f7e265cb31618dfd00d77 \
--hash=sha256:c1bc67752d5f21013cfe430df4062441714eab79f65a6a05e01505957e9c35fe \
--hash=sha256:c61750fadcd119d0825bcb7d7d675dd264dcc89cc05292aab5be68ebdbb374ad \
--hash=sha256:c90d5b3d4e944e065a301d741b3c1d784f6bd1f503aa68b4967e32b2ba313d85 \
--hash=sha256:c9a7f43c0b202b334cc9184af09bb8f21d3a209e038efaf106936fb69e6b026e \
--hash=sha256:cb96e6e088d6cf71c1ea977510948320234824cf226e32f6f6e044f7a9c82b34 \
--hash=sha256:cf63c214fe879a65e69a386f915e36104fc84254ab141240f8854602d8e0be2a \
--hash=sha256:d1aca03ede943eb80ab3d63bb082c84b7aab85ea83bd0fd0c200260945fb49d9 \
--hash=sha256:d2e56fd3b00222722abfb3f5f0759ddbae4b90811b5ad4343c64030ad1bde70c \
--hash=sha256:d5f93ebbeb8032d47e349328ec8662d973d9b05a70b3c35df1f91fe419b84749 \
--hash=sha256:d882a373d8093c2941e01291b7ced96e9cbe4781da9a7751ca7e6c70385e5214 \
--hash=sha256:d920abdfa61279ba1a2ef9484aab07bf03331f8c08a10120fa332353d06e6932 \
--hash=sha256:da2af0d7aebfc2074080d72efa6ab8317c62481ef1f896f65d9999c1c01f4494 \
--hash=sha256:dd8ea6ebee7aedbf7c749fa80521d9ccf1ba473e0d1e14805caafbaad281c889 \
--hash=sha256:de8b364c423ef0a4bad9069657d617f9a5d2b2062457a89b1fa16ee199c399c1 \
--hash=sha256:df1ae86ff54725a01fa1a0510b914ca53a161b7050be74f6204e24aded5971d0 \
--hash=sha256:dff05cb7016dff1e9fd68f4122c127b65dfc59de5306cfb7ad92f956f230bee2 \
--hash=sha256:e1a622f13970d81f95d0c72f9dc090dce9085fccfa4c9f2174377ee32bd15786 \
--hash=sha256:e49fb0d1ce92cfa0cb198cc5b1b11cdf9d0638658e2a2db2687e39db7c87fc78 \
--hash=sha256:e5c802729725bd07e2bc3ab7b76dc7e0bbfc53129d8f1eb1c002c24cf774717e \
--hash=sha256:e841068dc0be4cb6dfb5c890eb88cbdcff2f4a332393c7ec94e8e618bd32c1a8 \
--hash=sha256:e916035e3e9930cbdfdd10abf48861340221857f45509565898e012263f7b289 \
--hash=sha256:eba154571c16e032112afac0dc2dfe9e63c2ceb7aedd07bb7eecf2ce26d4dd4c \
--hash=sha256:f03460ff076f70ab595bb45a0205ccea1971443575b6920c52e755dec2b3fbfe \
--hash=sha256:f0ec3b750b59375eab5b0fb2b9254810c00a3375be6d789899f1055a1d556237 \
--hash=sha256:f291bcf42ae98eb5107edb162c3c998b4a89648fd8e99ed4cbd12705292788cd \
--hash=sha256:f61efe1d2fe0de16158a5fe1d1cf3c14bdb6aecd54d8938fd26512c525c1f624 \
--hash=sha256:f68edfc67aabac33708941f26f22a7b8e9f81429bc0cf249fcf7d66b23af8d19 \
--hash=sha256:fa95848c929b6a75f6848d3c9793e59db365ee436776e57db835cdbfa79ba977 \
--hash=sha256:fd9f8797427910198f95bced71ddfed61130d7e349213bfb8466c9c99e2c46a8 \
--hash=sha256:fdb4ca07ab75ffadab4a8b135ad59cdbb3156b99310f3d565370da74a15d6bd3
# via jinja2
mdurl==0.1.2 \
--hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 \
--hash=sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba
# via markdown-it-py
molecule==26.11.0 \
--hash=sha256:5e48f66e97ce03ba1e9cfdf4a3667db499e960543c91bb62f530c6cd6337dd9b \
--hash=sha256:706bb3d9a34e1531cfe1cda294974aad4ccba70af3ecb2d434266e0df73b0c09
# via
# -r requirements-molecule.txt
# molecule-plugins
molecule-plugins==26.11.0 \
--hash=sha256:194be2c43d950545cc699ab19f1a55b26853809e6e8c855ea1a42edacf5c7ee7 \
--hash=sha256:513808288b7027c465b124e66a2a31002c7c907b2fea9002f63ee90bb2d0ef84
# via -r requirements-molecule.txt
packaging==26.4 \
--hash=sha256:81383611a09c1bc0b08b76e0fd5829d7c6824c65b27a6aee339da133f4233ea2 \
--hash=sha256:c4b671c41ddb9bf26e543c37723610d28fb6bf7affc4da17cf048d419d2c062a
# via
# ansible-compat
# ansible-core
# molecule
pluggy==1.7.0 \
--hash=sha256:7dd7b0d8832ba3cb632c306926ded123429211b83641b35dc5c41ad2d34f9bec \
--hash=sha256:d1eaa46ebb595891b860ab086b4d09c8588af65ebd4361b8e8f4bb8920b90ba8
# via molecule
pycparser==3.12 \
--hash=sha256:a076f3f489b39b43ed13563a1dafe42447445bec2e294154ec5c57fcdda4c85e \
--hash=sha256:f03387877eab82ce01bbdfd0ba7252ee55a90b1c708d5129e2ce915475cf1db6
# via cffi
pygments==2.21.0 \
--hash=sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9 \
--hash=sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c
# via rich
pyyaml==6.0.4 \
--hash=sha256:070c22b6f490d6cc30912be9fb9ab1af9c752769b39b53616f6510c3f038ee6a \
--hash=sha256:0a3a351f04dc124f9357512bdb80ac37cd1750cf1371da33e7cbb96d80ac865f \
--hash=sha256:0db75f402e99c25239003a499c214a61947b4ef5312af34711d4c63e5c179318 \
--hash=sha256:1088ad740f50c13178dad16fbc2fa1f634c791d42c7009fdb390e38e5b90b788 \
--hash=sha256:12a155bc41509d71a2eb73e2191d9e400c1345ea99ac3d9946c31f40a4c840f8 \
--hash=sha256:131d11bd9b60d705a6388366d77ed67850995a4d2be85fe149785a257c17e531 \
--hash=sha256:132c3c7c37a8e6f334921b05cfea5d26e241d792dcbb4db0462129d25ca53b43 \
--hash=sha256:15c52bb238a15bb4fd7e6342a5ac71d594507667c7fe0e5a5abbc0f6875d1e91 \
--hash=sha256:1631d566655f3af7d6c4a4485267830f6b680d3dc9704b659b3c3f4541b5a3fe \
--hash=sha256:180ac792c958c2173f6e4467c55ae5f73ab1a9a624ee29fc7095c56d5e3a4055 \
--hash=sha256:18ea9bda247857fc0de05181675dc116b54c1b04ca3db71de5d2108c882823b7 \
--hash=sha256:1d2f08c122727c86f8303bb1dd45159ca1de1f2d68798e671ec46974e321008e \
--hash=sha256:1db4d51d3c2c9545dd44c614febc4594240754f74b30d8e501415b118347f0d1 \
--hash=sha256:2018fda285d1289527a389e1b4ace1e2d3af410930f949136b55ecb0747744d1 \
--hash=sha256:2c11be5ab4d9f603a598b5ce93a2064ae38087bdf1b384c5397170054cda4e36 \
--hash=sha256:33506a2620f0e7c49858f09cb44e99f144878d03af3d9c10aa136e9a1d103bcd \
--hash=sha256:34edca7ab64b705ee7c80bf3f9ac609240677db11e83d9317191f483a4b5a433 \
--hash=sha256:3c7129bcee5c88c1450802cc6a95b690ee7c51bfcc7a9b60bbd9549a7a4fcbe6 \
--hash=sha256:41b4669c3a8fd5750e594dff59d3e62d40e321fec467b50449603710ed0a68f3 \
--hash=sha256:45e37dd647db9d67b757444c74060c064ace5fdaa08f42bf4fda3812275d423e \
--hash=sha256:49e38a95e24738908ea852e61df0abc58d1e4d4f974ccdb2386eaee412bedc67 \
--hash=sha256:4a2a8f27d24d4cdc05aa11df5f4c08e13f30d9e6674809b6a5ddcfcba49a653a \
--hash=sha256:4a329472db6c8858ebd94f2214a54c8bff8f035a6cc7af1ab39cc1b33a5f0e56 \
--hash=sha256:4d1e8d6e345b4b4424a05a11e699e999e65a88f422f73636f8a0b354bf219ffa \
--hash=sha256:4d30c2f186612bd2f9f07c08a4c96721af59cfc8da3ec7cb27dfa2834e8bb019 \
--hash=sha256:4d3bbc5e8a84a5a6775adecac786f489510a7159b1c343d6f31426d888cfdd6e \
--hash=sha256:50588147ab2c6a59b5f990a4905db80899a6c2bd197e046a6201f1e67587e794 \
--hash=sha256:52460c6dd874b22d49fda228fac59da74d7a7b06175ffcc80bfa3ba5389d7f73 \
--hash=sha256:5246a0feaaac497b09c9462aa926280ae02fc8791b0099c0a925ebd7c7f249a6 \
--hash=sha256:54c23934cf166bb2090d73d82b1388aadb1cead5e73885223dcfa4a459a22d43 \
--hash=sha256:573debb9fe3075423d4f823795a678580e597218c25baef178d532b124a25a25 \
--hash=sha256:609e8efaffa5662da16b7d53eef76fc4eedbbe56fce5829b67ba808a6e35d399 \
--hash=sha256:60e9da2772e259307650e03c24f50e3bc2d9fa5ed1ba44c47582e13b0e7708d1 \
--hash=sha256:61eef2f08e977b725f37a8d1663f5a222c6f09207ac0794030d5fca062e7c96e \
--hash=sha256:622aa875fa6533f25fedcffe23079357d65a690d462200afed5d8e9d0e01ebee \
--hash=sha256:62c5b5669b05dabf991a705f3a3601f57b65e95121a1d3e3a4ae4446c8632865 \
--hash=sha256:67da066ca12eb60114ea87f2ecbcca622fff0c205c743cc900437127564fabf6 \
--hash=sha256:69380d4bae12aab2a2c9532deff6a2841bc9fda47c333691bd2368b696301768 \
--hash=sha256:6ac167ebebc0c387290406a337b9b5c8c343fa5f7928d5941e45a94b8ba3aa39 \
--hash=sha256:71bb5b87465d88d1dfc577115af6d435bff9b26f2512936f610c26aa55966028 \
--hash=sha256:730788375056c43d3ac15bd894c9cd2fb7a931a38b302f408620c64b3ef176ed \
--hash=sha256:7335809813ec838d9cd334b1744cda33deb141c9ef23a9c0df371c37980d3851 \
--hash=sha256:78be5a1b05a5d1fd46d0290393e5deeb581fa617585462c1b84f7c6b0cb1e489 \
--hash=sha256:84e97378010f3da8daf673b82d39ed638098d236a1b760d61c0c1348a642bd70 \
--hash=sha256:8708f6ab9c2581ffa05f66dae3206bb0385949650537d7295fc7ab0d6454dd70 \
--hash=sha256:872d2a592289061c1b987e335b3568a2616b474be02bd0608d8f551a385441cd \
--hash=sha256:88a089e6424a8a256321270620d5a4328ad5227fb2061b07d33f596894336914 \
--hash=sha256:8e0cd755ce5e9009fd95f9c553e5942478feb8f7dffa19435641fcdc3c20e8ca \
--hash=sha256:914b19e17814315fbcca52031bf79b68237f3d87a948c584a667b18b468e4df7 \
--hash=sha256:93bfb2459195406a518e2f487a9bbf01df240175f31e06f5a252ac6734c7bbf0 \
--hash=sha256:93da48af92c84c4236578e330a514ca324362c0bb62894d8d2343363ed57ff03 \
--hash=sha256:9d4211f080920629a90c9e31c51e326fb70cfae38f18d4128b9913c23642bace \
--hash=sha256:9e7ec9dc75cadd392fd687cc9b8ccf7dd59ada0a991e0d14ae0fad9ecdba00c3 \
--hash=sha256:a266cf55ee5cf63c1803432a61c6386e750e0012ca49d12d26ccb0ffd80b343a \
--hash=sha256:a3cc63af3d639d1609143711837b926183418260aae89ed95193c07b25b99d33 \
--hash=sha256:a56491babf0d976625807953bd192dd9de973fccb3270e77b1a795b152a26175 \
--hash=sha256:a65339c24f2fb8d4419e06ceec1bda98bdcff727b3b533a81d5af6bb2dd34520 \
--hash=sha256:ab874ebcc5c12c31c859a9e9fe159d688df1f7a099818ef8a35906264a8f5d6b \
--hash=sha256:b525488d5addf5d59ff4610cd8b1deab9dc97fe0fb3fb74533d7f65e9792bd92 \
--hash=sha256:b9fe0b8c65a1611053eb7fcaa7c022f655b7eebeb0ea034572615453cae6b843 \
--hash=sha256:c0d68d972f6f6417b4e85e9522f3d57bb4fbc924379766ccd87254a31009c1cd \
--hash=sha256:c24097c0462f66358c99dc83d3e1850e005f6293cfa1df1edb243428da1668bf \
--hash=sha256:c57e40928738c4a202852759f9e1ee2c7063429a9469ee1ac15651bbf7d69963 \
--hash=sha256:c604dc2613c417130479cdd6e55c2faa691b6365aa82b3dafddfcecc2eaf1ac7 \
--hash=sha256:c680622f85979f2ff59b4ae44c1ecb5566b2f0f0ffe5d0dc8b4bb6a0e916dabb \
--hash=sha256:d276f23e2371deb5ee68dd252cc9c2402b806b54d8d2cc7efbb6c34c3a78d886 \
--hash=sha256:d58fe9fa2056fed24f055b74d5dc808fa1f5d084c22e4118f0a08253fe677ffd \
--hash=sha256:e24bf71af8a432d7808fabff134d38dfe16d3cbb41f2873bb4b1e42422de0a1a \
--hash=sha256:e39017e1cef43d03b2ba427f60213e4b36dbc6fb092235fa3de3a510ce064d3c \
--hash=sha256:e956541cc7a3fff2bb5b17aeb6c5bb42c86c8e6dafb5ebdd41a05e72e702076b \
--hash=sha256:ed9b957abb12f6ffcd92d5db32fa3ffd4e4a8423d80ddd51b4efa63b42f6a76b \
--hash=sha256:efe68ed09903cca9ab4117c2b9ea6ee8d369818808945bb5a7fa8009b5630b45 \
--hash=sha256:f1a4a85b419f5cb6470dd4be5f766bc59532f11b9c22c076b58a0348f05dca5f \
--hash=sha256:f5c410f9e2ffc9286279a46f2e8c107edaf3b1123510af59c828a9c15b23c9db \
--hash=sha256:f617e4e5c619fef5284335b24e3af3a77ce08dc5c389ff4b25033bb2749032b7
# via
# ansible-compat
# ansible-core
# molecule
referencing==0.37.0 \
--hash=sha256:381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231 \
--hash=sha256:44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8
# via
# jsonschema
# jsonschema-specifications
requests==2.34.2 \
--hash=sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0 \
--hash=sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed
# via
# docker
# molecule-plugins
resolvelib==1.2.1 \
--hash=sha256:7d08a2022f6e16ce405d60b68c390f054efcfd0477d4b9bd019cc941c28fad1c \
--hash=sha256:fb06b66c8da04172d9e72a21d7d06186d8919e32ae5ab5cdf5b9d920be805ac2
# via ansible-core
rich==15.0.0 \
--hash=sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb \
--hash=sha256:edd07a4824c6b40189fb7ac9bc4c52536e9780fbbfbddf6f1e2502c31b068c36
# via
# enrich
# molecule
rpds-py==2026.9.1 \
--hash=sha256:00ba2d8c7dd4ee537978ddf4b3fbd712bef2d8751603f7f3146b3f4287768e25 \
--hash=sha256:01445c8d194aa032a08e944f16567672da1c62dbdbefd8b6d0693032e290cf68 \
--hash=sha256:028ad274ea951dac64491b5d1e65712a4aeabfdbdb9fccf797b57bd899b0c495 \
--hash=sha256:0483515261947e4e8b8e1375bf7463e7eb6ccfb3d86e7b554d90cd5285f20f32 \
--hash=sha256:068c37bba854ec2fe42f7365c640af11dd9895890ccbf2df5070d0c059bd7f96 \
--hash=sha256:074a4d198bc34d9a8ea425114fc3ded6d11ec01f6a314a8db67454a5152d8834 \
--hash=sha256:07deecbfce94c78473018bc7d10b337cc651d12df87a1eb2cb3e4024bc9c33d0 \
--hash=sha256:08dae4a4095150a7c4545a1fb40b98e1ab1744fbc2770d92c977b9dadaa49ab6 \
--hash=sha256:0da298fb372dc192610a4b9ecbc68a0cd8b675bbbd1fc519d01b41cfd658333e \
--hash=sha256:0f045bb053c9057720d72c56dffe30dffdc05997b2897a827b9325f0ab6623fa \
--hash=sha256:10e208f2425d973938afcd56e28a7c4be32e27b6a60b5d381f49fb9d8acf9759 \
--hash=sha256:136a1c3fe4402b7008bc81cb62ee538481795b61a7e83df88dff3b3f02b726ff \
--hash=sha256:159a7aab5c5e8b112c8830f54717ce56da1252ebdbb526f5be2df2309280b9e7 \
--hash=sha256:172e47169583f46ce118cbec68e6795d0da0f4606b488b6434f8276bca0a058c \
--hash=sha256:1c2d1f6da5128eabf34e963d7163a818846075a52568250d006c4c953b40f903 \
--hash=sha256:1d55198263bb51f557550c6ed2e6d1cb6a6fed6eb5c9120b741c5926bef8a45d \
--hash=sha256:1d77b649e6f7cdf12ca5c2a98dad0ad37f9ea9b6f960408a92f0cb12bb3d04d9 \
--hash=sha256:1e8d4d79d828299bf44a55db22a9388ab967b49d17132c88eab0f4360b48da8e \
--hash=sha256:22ffd29a63d71fb1b81552c21f2c2b734949b7ac751a9be70675a939a900839b \
--hash=sha256:2693b2728bbcc48d09a981a356954b0c47c53ff25b545856f28a889ea619f69a \
--hash=sha256:270bdcdaac5d5b6f73c5e22e7e135c7f2a50e789f71d9e241d5be8d90026e19a \
--hash=sha256:2711d29b653b3bce48a63d18b9c6b53274669e6d6c4094dddeb4d9a0e45128b2 \
--hash=sha256:2c16ab111bc27c646ba8aa005d0527754edc538ebb636f0b1bf8e244b48d1945 \
--hash=sha256:306ee1850d8105b5baf977e78d45fcadd12c1a54678d614c9baf217708446e91 \
--hash=sha256:3231c4c0e521dafa5be0c9f114ee2c2ad46650836f2d72caa86801950c3e7044 \
--hash=sha256:3890a6aa36e6baa53d5258a2a25d3ef8b37ad165a6ab27a892d7c3e3a432cd69 \
--hash=sha256:3a72c11530d71abfb66c8d7696a2f86c43e63fca8b948f1a784ac490f4ec688e \
--hash=sha256:3b5a6f40f0a1486b4b36c888123afc67acdbd9f33235927acf5ff295429a0ba3 \
--hash=sha256:3c91c210ae7645626c608400e3519b4a642f837cce09ca830db3beb2e9f274d4 \
--hash=sha256:3cd182d7291d29b92c521a0069d9c01ba6193628a9a105531d11b40a6d731a33 \
--hash=sha256:3e524c7874ac72884d28e16dd5b8d839fd09e0fe76b020d3fbca23212a7b8c52 \
--hash=sha256:3e93b2cd69a9830be33e03945cd7cda940a0a8bfcfbff41d6144f0cb0d3d8bd9 \
--hash=sha256:3edae8c5ddfdb6985d49ae9d150516e5076888879022f91a26c2de9276ce0bdb \
--hash=sha256:3f0e9ac28fc067d4d34b88ae43c48e9489455c97fee9633d851f7eeed5a05d35 \
--hash=sha256:42e75466f83cd43f6026c81eab74246efb2bdadafb307b85700632d06c68f299 \
--hash=sha256:44b32a7c4f0da3d28af31c259e38ddcff096f855e205ed0671d02fcf44f1ea1c \
--hash=sha256:457866b85daf5034296666168b84a69e0b2e89dc4f1af102b46f6448a60b9063 \
--hash=sha256:45bc6bccf78b20fd834237d18db64965d7ee68ba7f60440a26c7ab71e7b8d51a \
--hash=sha256:46d80bc76b51a6c24f9944368c28d38b8bcbcea1da4f2f8d3ebc31a67e8c6ec6 \
--hash=sha256:4793ef7f78268b124b73fa933440f01d258bbae01de9fa53e9080c9ab0425a12 \
--hash=sha256:492e5e428cbe126221611f47e068f01660352feec4ad18bc0f5ea9b2ae88fb14 \
--hash=sha256:4b26b03d9d2658ee2fa234f8f4f19f38a09773fe5261028025032e26d4d35af0 \
--hash=sha256:4c0d2cb595a420b34d5086db0add011e26e2c09d6a024afbac4228bf8f863a30 \
--hash=sha256:4cfaf02209061880210819934de2f4f6aa83dc04dafe6770276acc240a56da31 \
--hash=sha256:501909f2e4a1e2dee528ef766fe3c469060ebc17e54a8383d404ba07a81a6f02 \
--hash=sha256:50906f5aea24b5a865cbd0a589698288631d9f3a54c3a937c83aefa95a0d14af \
--hash=sha256:54ac2158a6f96cfbabff0b2eedaf94b90c5ec7ca8317fcadc61e1c2b2e0ff6ef \
--hash=sha256:56c6952a9b15047466d0c2347c446a761d4527f89976156341e68f0ce5cc08b0 \
--hash=sha256:56cd8b3f77d7b6812f533b662186a1f28316931166ddc00fb893b1b0db7e9888 \
--hash=sha256:57492a550a1d88d29d003247e5f78dd8cf04a701fac0e4c8db8745a6d2504e0a \
--hash=sha256:5943980471829f6de242a20b109de3111ba6b77e3af0ffc587028ac854b05e6c \
--hash=sha256:5c6ee90dee3e85e055ddfd502d611643d9b0fd94c818220bda84ec3dacd9b27b \
--hash=sha256:5c90e7fa02e8f5de0d10c17595c568ada48c5302e749462c0ea1a4c362111a86 \
--hash=sha256:5ce8943f79c2210f7abcc28e86367b03b28d95027fd01c46d2472373ae70c86f \
--hash=sha256:617f59cde379b4f648a09797b7f683d04b90a46344cddab85639da5aff0f5531 \
--hash=sha256:6307a0da524939decb8ca4a3933b8ab62525794411d6984fca6726e732804af6 \
--hash=sha256:684fd492fff4fead00587544e059be2bbcb6f93454f21fa2a91b66fc7508be82 \
--hash=sha256:6b5b393eda5ea42cca1c1a6665f2a4882b4fd5d1777e41ce0545a107fb008c9d \
--hash=sha256:6b723eb406dec5bc9ec516c73ab9c3239a3284e017f7eb89ee2b3258bd504fb7 \
--hash=sha256:6b9bf3135b4ad5981df9a73d71a35272d650a2985ae9c2746357b24d59de2448 \
--hash=sha256:6beb738155fe8ab8091afdfa5a3226b21c2b1593f1e50ebb90eb25b44dbc0391 \
--hash=sha256:6c0dbbcc19735fe5f8b0a54c07659d154a9e69f47e15d0a6ab7299215daf62cb \
--hash=sha256:6cdc537c8633d7fd92a82e2e0d2ab74320a3f63d5e59fb9cf08711e08fe151c4 \
--hash=sha256:6eae33003518fd4cb4f83a218d5371469dd3001aa3b87128c005b07762f7fe5e \
--hash=sha256:740d0a99cf9de0b17a3943388e9294a59becf75e7c43421f387bd3c7a9901f7c \
--hash=sha256:75c38c50ab9aca840225d9a9a3810bf11d04bd5c1f186cabbb8aee56db3e9b15 \
--hash=sha256:761fdae6728ceb99ab182fad2f0cc1e262f610834dc891aea1d1a2a2e634776f \
--hash=sha256:7664419f27db41d4f1c43a78dccda7dd6e8ef2428df3ee01d0c2a07a6b071297 \
--hash=sha256:76d3af9732d2dab69f28179b40ba2d87e2f1d5824b4a694780aa787d685e8f36 \
--hash=sha256:78326f4cb4427a56ba4996c0762b63be45f06b85f086526420d2b3a66e40f84d \
--hash=sha256:7868b85224291c6cb6759f9b5adb9745f486d226f62b16a614dd5a2a5ab2b35b \
--hash=sha256:815d26356930846a40c7bc1366e7b1b0320ab8a063e66c11298a208bed0fd237 \
--hash=sha256:8171b44a054e5c67fd748ada04187f1250bf35b95f85e52ab64bcf3331a923bb \
--hash=sha256:821b2755db9194409254012f429c56643416fb96ef9be090be82ec8826b7f477 \
--hash=sha256:837c6b305e26fe0f75b15c92cf3b2ba29e0ae19dc40b1c557b026cb426347d0c \
--hash=sha256:839dde845559254f34885267c6878f60d61d5205180226d976fe488d45fa128e \
--hash=sha256:84a6ecc0c940169190d2c23bd969debd48c94dbc855acd60188a68d71d421608 \
--hash=sha256:8601470267d938bcb7f3ab1a336100af51a4fd5b6ed030ef52461bb3ef5e7e07 \
--hash=sha256:88b5268892fde430d5531f95bc560b6efbbd67c929662c586afd729a96e7461c \
--hash=sha256:8aa5dda18d39b6143eb24809d158f9252c88f402749b6f1b62a506cc7d96cc35 \
--hash=sha256:926bdd3e3b5998ddf70cc64bc8cf57209571f9044542913afb673799fec77dd0 \
--hash=sha256:96beca19ec79de272e8668585380ff9092c47077c1d7a1e098e00bbd921f4785 \
--hash=sha256:9a0460d43603d1fd9ef59c30278531e15d78581721ddb538fa560aa7817ea4ad \
--hash=sha256:a03d57b86d2a51d0a66c92177e2be154ad015f357791d306e714569999cdb4cc \
--hash=sha256:a36b70596407634ca82d4b989a3729074a008537a0522e4c8046a67c729103e9 \
--hash=sha256:a3a52a3ba86436ab3aef510fbe21512abc2ddd1993005dfe50514bd2284ef025 \
--hash=sha256:a3dbc5ed9514908d5046107d7b1346bde71eea61de6e0e4919c19354f97e769f \
--hash=sha256:a431156bb41865fc14cd5d79bb9d7bbed83110b0159e34e62ae30951f96c0009 \
--hash=sha256:a575404ebc9cf2e91edd32eaf570ec1430eb900d4f56724ba7dd4bc1fc9c176d \
--hash=sha256:a5cf77eb04f20b720be95265a3e00eb2a14814074255cc27069c551b2db53118 \
--hash=sha256:a8763f20692da7df39b0afdd1ba3042b004c50a45994f76c2d9a25641f7673db \
--hash=sha256:ab4b2fda7c2b542f7f9d886cc6a838c5079d2b76f72e6081411faba11adde2c9 \
--hash=sha256:addeda51556dac7c1a2f14cda62db8b621cd12afba3091d03a96c72932387eab \
--hash=sha256:b242c27c8f836305a4a72df9cdd564386ac57b807bd252a063223331c9316b37 \
--hash=sha256:b4f062343e7ad3fa94f2c66e5ae667dee47ee74dd41a9057c4fbe163236a123d \
--hash=sha256:b5b8b0753718d258fd454283fbd57e14545d3b40583fa672e27cb4f987626bcc \
--hash=sha256:be3e47e2d91aa3942ff9bf4077a505226005abfc39b6f7554a91c1b9393986b9 \
--hash=sha256:befc2d6a953e563f8a7bfd87a42c22ebf8a3e980dcb7b6a4d17b70b0e914e8a3 \
--hash=sha256:bf35d0568abda97233239ce32896d3ad53fccc537832c104e30c94aa5fb93569 \
--hash=sha256:c933c6678c6f116ff8af47a4c6db0868b8ace74af0343016c0ef00f00272ea69 \
--hash=sha256:c9d1aca01f49170fdcf5c92761b1fafe97f554b721ca4570c5949fff778f0d4b \
--hash=sha256:cdeaa99ce822dca76cfb1b993e9120c5ea212f2eb66d48950ad63c349668a018 \
--hash=sha256:ce4d4f52e2a4324396caddbd45a97d8d7be5f42edd25d2355282a9c34f9b2f7f \
--hash=sha256:d1028417bb44037eb3069c1009bd7b7277212876cda22fbe565b0bca9fab6d2c \
--hash=sha256:d151e148117294133bf8af7eeace085e7e87432db15ab6adf640330298a47f6f \
--hash=sha256:d7841166b7fa64c9c56404617ae4341448847482d45933b13135d26c130519e5 \
--hash=sha256:d7fca4eb6df565e2a928f1c7dad92d27db8f9df0f449e76423ed5d7e713ed445 \
--hash=sha256:d95a354e02393eada6d7351184671aced9d4cce109dabf927cb7aa99624352a1 \
--hash=sha256:d9edf30457d74eebfd76b045535e36f1cd89062566a128a0db2145ca042d787e \
--hash=sha256:dbc2673f9223d420c91145599b3ba45a8a50c207d1976908e5fb5ddb0c9b9429 \
--hash=sha256:e01b3c878c8641913e688edd1b3f08658c6783d29cf6b826bd3c0d1ae7a1ffaa \
--hash=sha256:e21c1429e205828ea886a2293a4a2c8e01f4c25d9893ca330e97a6cf73f52e7b \
--hash=sha256:e43d4a1f673e8a1cbd8533e809e02b4bf9d4f2280269bb640436556312121250 \
--hash=sha256:e6d198bad4e49dd6732fbd636e2fc5c082f45c8cad0b4acb756b00c82c76072e \
--hash=sha256:e6ea1cda8d8c688278430e4268a42f5e5da3bdd74578dfadc0820c3f1766ce83 \
--hash=sha256:ea394a937f17a54c51239348bdbe2e3518124c8d4a8951ba04a311d3095bd18f \
--hash=sha256:eac2f5dbafd585dfe31f86a23ebf0d3ba480a9d49ebc87947267b5608d4ea0cd \
--hash=sha256:eb61be926bb81567c1f48bdc8aa22b9855048dc2efd53871f9f7e6e9a5632346 \
--hash=sha256:eba5d173f7d5708b22a93815017a4611873ed54db9f268077c0dd1ed99cfc858 \
--hash=sha256:ec450527cbf485e13c8d3602a54f428ab0432fdade0ede75efd74b735421c871 \
--hash=sha256:eef6a03b0b6d08d0835ccfa8ec8d1bc70525e3801387567137b50c557695e6da \
--hash=sha256:ef0d8c843e2827d6c120ab4687e9423fb1d893db1df27b7c1506615bcb9734a0 \
--hash=sha256:ef6b65b03247c54692ad4fd9ee97cb772781927db72e3cb05e70b3db6d1ff14f \
--hash=sha256:f3d6ed6a98cfd19155996605474982cc470d7601746a6439078f1a5a3fa8b050 \
--hash=sha256:fce4b85234a0cbad67bf8e6e1201ee815d172c9aebad75f25645bc4d834f8e31 \
--hash=sha256:fda1d96e542c37b6c804547dbf489c129fe7c97183a76a5ec275909ba1a063df \
--hash=sha256:fdcd198979b4ecffcc1beba366a7fbcf4eb41243691a82fe52ceb0b902f09c12 \
--hash=sha256:fe5ad0664ec772b02c45859041aa17655709cced7a31005817fbbbd988c25567
# via
# jsonschema
# referencing
selinux==0.3.0 \
--hash=sha256:2a88b337ac46ad0f06f557b2806c3df62421972f766673dd8bf26732fb75a9ea \
--hash=sha256:ecf7add45c939e9dda682c390a2cd0a845c94a4793a2cce9e8870d4ee9501f99
# via molecule-plugins
subprocess-tee==0.4.2 \
--hash=sha256:21942e976715af4a19a526918adb03a8a27a8edab959f2d075b777e3d78f532d \
--hash=sha256:91b2b4da3aae9a7088d84acaf2ea0abee3f4fd9c0d2eae69a9b9122a71476590
# via ansible-compat
urllib3==2.8.0 \
--hash=sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3 \
--hash=sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63
# via
# docker
# requests
wcmatch==12.0.4 \
--hash=sha256:23fe77fbfa3fff9e46f0f4a3d1891065270596774bd6131bd2f973fb822242a1 \
--hash=sha256:3e61e404a90a8b6c8bca197fb9ad5f1accbb34ee206b63e0c588a2ab9aa05862
# via molecule
-11
View File
@@ -1,11 +0,0 @@
# Pinned tooling of the molecule-controller image (images/molecule-controller, ADR 0003): what Molecule
# itself runs, nothing Lint uses. requirements-molecule.lock is its hashed lock and is what gets installed:
# pip install --require-hashes -r requirements-molecule.lock -r requirements-molecule.txt
# Renovate bumps a pin here and regenerates the lock (pip-compile manager); by hand, run
# scripts/lock-requirements.sh requirements-molecule.txt and commit both files.
# ansible-core equals the pin of requirements-dev.txt (check_image_versions.py pins fails otherwise), so
# Lint and Molecule judge the code with one ansible-core.
ansible-core==2.22.0
molecule==26.11.0
# The Docker driver, with the docker Python SDK it and the community.docker modules of its playbooks use.
molecule-plugins[docker]==26.11.0
+1 -1
View File
@@ -82,7 +82,7 @@ Main entry point: `fail2ban` (everything), `fail2ban_install`, `fail2ban_validat
## Tests
The scenario `molecule/default/` runs in CI only, on two platforms: `${MOLECULE_IMAGE}` (Ubuntu 24.04) and `${MOLECULE_IMAGE_2604}` (Ubuntu 26.04). It runs `check` before the converge (a fresh host, where the role installs fail2ban) and after it (a configured host).
The scenario `molecule/default/` runs in CI only, on two platforms: `${MOLECULE_IMAGE}` (Ubuntu 24.04) and `${MOLECULE_IMAGE_2604}` (Ubuntu 26.04). It runs `check` before the converge (a fresh host, where the image already has fail2ban installed) and after it (a configured host).
- Converge applies the main entry point with an extra `fail2ban_ignoreip` network and calls `service_jail` twice, one jail with a `logpath` and one with a `journalmatch`.
- Converge also runs inputs that must be refused: a service filter without `failregex`, and a `fail2ban_ignoreip` entry with whitespace, a plain string instead of a list, and an entry starting with `;`. The `fail2ban_ignoreip` refusals are matched on their message.
@@ -3,7 +3,7 @@
# (MOLECULE_IMAGE) and molecule-ubuntu2604 (MOLECULE_IMAGE_2604) images, pinned in
# .gitea/workflows/molecule.yml. No privileged mode: systemd needs a writable cgroup and the
# firewall tools need NET_ADMIN, nothing else. Needs the network:
# prepare purges any fail2ban and refreshes the APT cache the image deletes.
# prepare purges the fail2ban the image ships and refreshes the APT cache the image deletes.
driver:
name: docker
platforms:
@@ -1,6 +1,6 @@
---
# The purge keeps the scenario independent of what the image ships. The image keeps no APT lists,
# and the check step needs them, or the install task cannot even preview the package.
# The image ships fail2ban and no APT lists; the check step needs fail2ban gone and the lists back,
# or the install task cannot even preview the package.
- name: Prepare a host without fail2ban
hosts: all
gather_facts: false
+1 -7
View File
@@ -1,15 +1,9 @@
---
# The image keeps no APT lists, and --check does not refresh them, so the fresh-host check needs
# them to preview the fail2ban install. The log file a service jail watches must exist, or
# `fail2ban-client -t` fails.
# The log file a service jail watches must exist, or `fail2ban-client -t` fails.
- name: Prepare
hosts: all
gather_facts: false
tasks:
- name: Refresh the APT cache
ansible.builtin.apt:
update_cache: true
- name: Create the log file the logpath jail watches
ansible.builtin.file:
path: /var/log/svc-a.log
+1 -1
View File
@@ -7,7 +7,7 @@
# the service starts) is not covered. The mint tasks only assert, but the remove-path play at the
# end of verify.yml needs systemd (it stops and disables a stub unit) and ufw (it deletes the Gitea
# rules), so the container runs systemd as PID 1 with a writable cgroup and NET_ADMIN. No
# privileged mode. Both images have gnupg preinstalled; prepare.yml installs ufw from the archive.
# privileged mode. Both images have ufw and gnupg preinstalled, so the scenario downloads nothing.
driver:
name: docker
platforms:
-12
View File
@@ -1,12 +0,0 @@
---
# The remove-path play in verify.yml needs ufw, which the image does not ship. It keeps no APT
# lists, so the install refreshes them.
- name: Prepare
hosts: all
gather_facts: false
tasks:
- name: Install ufw
ansible.builtin.apt:
name: ufw
state: present
update_cache: true
+133
View File
@@ -0,0 +1,133 @@
# pve_vm
Clones a Proxmox VE QEMU VM from a template through the Proxmox API and keeps its configuration, cloud-init settings, boot disk size and power state in line with the inputs. The configuration is updated only when drift is detected. Variables and their types are defined in [`meta/argument_specs.yml`](meta/argument_specs.yml), which is the source of truth.
## Supported platforms
Ubuntu 24.04 (noble) and 26.04 (resolute) guests, the platforms the molecule scenario runs on. The play runs for the VM's inventory host: the API calls run on the controller (`pve_vm_delegate`, default `localhost`), and only the cloud-init wait runs on the guest itself. The template the VM is cloned from must be a cloud-init image of one of these releases.
The guest-side cloud-init wait (`cloud-init status --wait`) is untested on both releases: the test images do not ship cloud-init.
The role targets the guests, not the Proxmox node, so it does not declare Debian trixie: the node is reached only through its API.
## Requirements and run order
- Use it by its fully qualified name, `mortis.kamino.pve_vm`, in a play over the VM hosts with `gather_facts: false`: the VM may not exist yet when the play starts.
- The controller needs the `community.proxmox` collection and the Python libraries `proxmoxer` 2.3 or later and `requests`.
- Role dependencies: none.
- `pve_vm_node` and `pve_vm_vmid` are required. `pve_vm_api_user` and `pve_vm_api_token_secret` have no usable default and are asserted non-empty before any change; `pve_vm_disk_size` too while `pve_vm_manage_disk` is true, unless `pve_vm_state` is `absent`.
- `pve_vm_api_host` defaults to the `ansible_host` of `pve_vm_node` from hostvars, so the node must then be an inventory host even when only the VM hosts are targeted. Set `pve_vm_api_host` explicitly when the node is not in the inventory.
- The VM's own `ansible_host` is the target of the SSH wait, and `inventory_hostname`, lowercased with underscores replaced by dashes, is its name in Proxmox.
- Run it before any role that configures the inside of the VM. Gate those on `pve_vm_exists` (below).
### API privileges
The API token needs, on the VM (or a pool or path above it), the template and the storage:
- `VM.Allocate`, `VM.Clone` (on the template), `VM.Audit` and `VM.Config.*` (`VM.Config.CDROM`, `VM.Config.CPU`, `VM.Config.Cloudinit`, `VM.Config.Disk`, `VM.Config.HWType`, `VM.Config.Memory`, `VM.Config.Network`, `VM.Config.Options`), and `VM.PowerMgmt` for the power state and restarts;
- `Datastore.AllocateSpace` on the storage that holds the disks;
- `SDN.Use` on the bridge or zone when `pve_vm_network` sets a network.
A token with privilege separation (the Proxmox default) gets the intersection of its own ACL and its user's: grant the role on both the user and the token.
## Role variables
| Variable | Default | Description |
|---|---|---|
| `pve_vm_node` | none (required) | Name of the Proxmox node that owns the VM. |
| `pve_vm_vmid` | none (required) | VM id; for a clone, the new id. |
| `pve_vm_state` | `present` | `present`, `started`, `stopped` or `absent`. `present` leaves the power state alone. |
| `pve_vm_allow_destroy` | `false` | Required before `absent` deletes the VM. |
| `pve_vm_clone_vmid` | none | Template id, read and asserted set only when the VM does not exist and is cloned. |
| `pve_vm_full_clone` | `true` | Full clone instead of a linked clone. |
| `pve_vm_delegate` | `localhost` | Host that runs the API module tasks. |
| `pve_vm_wait_for_guest` | `true` | Wait for SSH and cloud-init when `started`. |
| `pve_vm_agent` | `true` | QEMU guest agent. |
| `pve_vm_onboot` | `true` | Start on node boot. |
| `pve_vm_autostart` | `true` | Sent as `autostart` on update, never compared. |
| `pve_vm_memory`, `pve_vm_cores`, `pve_vm_sockets` | none | Sizing, omitted when undefined. |
| `pve_vm_network`, `pve_vm_ipconfig` | none | Mappings for `net` and `ipconfig`, see the spec. Omitted when undefined. |
| `pve_vm_nameservers` | none | List, or space or comma separated string. Omitted when undefined. |
| `pve_vm_sshkeys` | none | Cloud-init public keys, one per line. Omitted when undefined. |
| `pve_vm_ci_user` | `""` | Cloud-init user (`ciuser`). Left out of the update and of the drift check when empty. |
| `pve_vm_force_update` | `false` | Push the configuration and cloud-init settings without drift. |
| `pve_vm_manage_disk` | `true` | Grow the boot disk to `pve_vm_disk_size`. |
| `pve_vm_disk_size` | none (asserted) | Boot disk size, for example `32G`; only ever grown. |
| `pve_vm_boot_disk` | `scsi0` | Disk key whose size is read and resized. |
| `pve_vm_reboot_if_required` | `true` | Restart the VM after its boot disk was grown. |
| `pve_vm_api_user` | `""` (asserted) | API user without realm; `@<pve_vm_api_realm>` is appended. |
| `pve_vm_api_realm` | `pam` | Realm of the API user. |
| `pve_vm_api_token_id` | `<pve_vm_api_user>-token` | API token id. |
| `pve_vm_api_token_secret` | none (asserted) | API token secret, normally vaulted. No default. `no_log`. |
| `pve_vm_api_host` | `ansible_host` of `pve_vm_node`, empty without it | Proxmox API address (port 8006). |
The `pve_vm_api_*` inputs are applied through `module_defaults` inside the block that holds every API call of the role, and the REST lookup of the VM config sends the header `PVEAPIToken=<user>@<realm>!<token_id>=<secret>`, derived in `vars/main.yml`.
## Variables set by the role
- `pve_vm_exists`: the VM exists on the node.
## Tags
The input validation (`tasks/validate.yml`) carries `always`, so it runs whatever tags are selected. No other task is tagged, so only a play-level tag applies to them.
## Example play
```yaml
- name: Provision VMs
hosts: vms
gather_facts: false
roles:
- role: mortis.kamino.pve_vm
vars:
pve_vm_state: started
pve_vm_node: pve1
pve_vm_vmid: 210
pve_vm_clone_vmid: 9000
pve_vm_memory: 4096
pve_vm_cores: 2
pve_vm_disk_size: 32G
pve_vm_network:
net0:
model: virtio
bridge: vmbr0
tag: 20
pve_vm_ipconfig:
ipconfig0: "ip={{ ansible_host }}/24,gw=192.0.2.1"
pve_vm_ci_user: ubuntu
pve_vm_sshkeys: "{{ lookup('ansible.builtin.file', 'files/admin.pub') }}"
pve_vm_api_user: ansible
pve_vm_api_token_secret: "{{ vault_pve_api_token_secret }}"
- name: Configure the VMs
hosts: vms
tasks:
- name: Configure the guest
ansible.builtin.include_role:
name: mortis.kamino.user_management
when: pve_vm_exists | default(false)
```
## Tests
The `default` molecule scenario runs in CI on Ubuntu 24.04 (noble) and 26.04 (resolute), the `molecule-ubuntu2404` and `molecule-ubuntu2604` images, which stand in for the guest. It runs `check` before the converge (a fresh host) and after it. The converge includes the internal task files `validate` and `detect_drift`, with a seeded VM config in Proxmox's own forms standing in for the REST lookup.
- Positive: `validate` accepts the scenario inputs, an unmanaged disk without a size, and `absent` without a size.
- Negative: through `main`, a state outside the spec, a VM id that is not a number, a missing API user and a missing token secret; through `validate`, a missing token secret with `absent` and a managed disk without a size; through `create`, a clone without `pve_vm_clone_vmid`. Each asserts the expected message.
- Drift: `detect_drift` over seeded configs: a matching config; the cloud-init user (empty input with a different or missing live `ciuser`, a changed user, a missing `ciuser`); the SSH keys (missing, rotated, empty input); a forced update; Proxmox's other value forms; every compared dimension at once; a dropped VLAN tag.
- Static, over every task file under `tasks/` (subdirectories and nested `block`, `rescue` and `always` included): no task calling `proxmox_kvm` (as `community.proxmox.proxmox_kvm`, `community.general.proxmox_kvm`, `ansible.legacy.proxmox_kvm` or `proxmox_kvm`, by its key or through `action` or `local_action`, with its `args` merged) sends `cipassword`; no `module_defaults` entry of any task or block sets `cipassword`; exactly one such task deletes a stored `cipassword`, and it is `no_log`.
Not exercised: the API lifecycle (lookup, clone, update, the `cipassword` delete, resize, start, stop, restart and delete), as there is no Proxmox API in the scenario; and the guest-side cloud-init wait, as the test images do not ship cloud-init.
## Notes
- Idempotent: yes, as far as drift detection goes, which the scenario checks: the update runs only on drift. The API calls themselves rely on `community.proxmox`, which is not tested; the update and the `cipassword` delete report changed whenever they run.
- Check mode: `--check` is the supported preview; a play-level `check_mode: true` is not supported. `proxmox_kvm` and `proxmox_disk` have no check mode support, so under `--check` the two reads (the `proxmox_kvm` `state: current` lookup and the REST GET of the VM config) run for real with `check_mode: false`, and every write is skipped and previewed instead: `Preview VM creation` for a missing VM (nothing else runs for it), `Report configuration drift` names the drifted dimensions and a pending disk resize (changed when the update or resize would run; it also reports on a real run), `Preview deletion of the stored cloud-init password` and `Preview VM power state`. Delete and restart are skipped. Roles gated on `pve_vm_exists` therefore run in check mode against existing VMs.
- Drift is checked for name, CPU type (always `host`), memory, cores, sockets, cloud-init user, `ipconfig0`, nameservers, `onboot`, agent and `net0`. A missing `ciuser` or `sshkeys` key in the live config also counts, and so does the first run after a clone.
- Cloud-init `sshkeys` are stored URL-encoded by Proxmox and cannot be diffed. A rotated `pve_vm_sshkeys` reaches an existing VM only through other detected drift, a fresh clone or `pve_vm_force_update: true`.
- The role never sets a cloud-init password (`cipassword`): the first login is by SSH key. A `cipassword` stored on a VM is deleted on the next real run, by a `no_log` task.
- Disk: the boot disk only grows. Only the digits of `pve_vm_disk_size` are compared with the current size in GB. After a resize the VM is restarted when `pve_vm_reboot_if_required` is true.
- With `pve_vm_state: absent` and `pve_vm_allow_destroy` true the VM is stopped and deleted and the play ends for that host. Without `pve_vm_allow_destroy` the role only looks the VM up and changes nothing.
- A VM that does not exist is detected by the module's "does not exist in cluster" message. Any other lookup failure stops the run, re-raised with only the module message.
- TLS certificates of the API are not verified.
- `no_log` is set on every task that carries the API token.
+31
View File
@@ -0,0 +1,31 @@
---
pve_vm_state: present # present | started | stopped | absent
pve_vm_allow_destroy: false
pve_vm_full_clone: true
pve_vm_wait_for_guest: true
pve_vm_delegate: localhost
pve_vm_agent: true
pve_vm_onboot: true
# Sent on update only; Proxmox does not return it in the VM config, so it is never compared.
pve_vm_autostart: true
pve_vm_manage_disk: true
pve_vm_boot_disk: scsi0
# Restart the VM after its boot disk was grown.
pve_vm_reboot_if_required: true
# Cloud-init (ciuser, sshkeys) is pushed to an existing VM only on other drift, on the first run
# after a clone, or when this is true: Proxmox stores sshkeys URL-encoded, so a rotated key is not
# detected as drift.
pve_vm_force_update: false
# Cloud-init user (ciuser). Empty means not sent to Proxmox and not compared for drift.
pve_vm_ci_user: ""
# Proxmox API credentials, asserted in tasks/validate.yml before any change. The user is the bare
# name: the role appends @<pve_vm_api_realm>. The token secret, pve_vm_api_token_secret, is a secret
# input with no default, normally vaulted.
pve_vm_api_user: ""
pve_vm_api_realm: pam
pve_vm_api_token_id: "{{ pve_vm_api_user }}-token"
# The Proxmox node's address. Guarded so the default templates to '' (and the argument validation
# passes) on a host without pve_vm_node.
pve_vm_api_host: "{{ hostvars[pve_vm_node].ansible_host if pve_vm_node is defined else '' }}"
+197
View File
@@ -0,0 +1,197 @@
---
argument_specs:
main:
short_description: Manage a Proxmox VE QEMU VM cloned from a template
description:
- >-
Looks the VM up through the Proxmox API, deletes it when C(pve_vm_state) is absent and C(pve_vm_allow_destroy) is
true, otherwise clones it from the template C(pve_vm_clone_vmid) when it does not exist, compares the live
configuration with the desired one, updates it only on drift, grows the boot disk, applies the power state
and waits for SSH and cloud-init when the VM is started.
- >-
Every API call is delegated to C(pve_vm_delegate) (the REST lookup of the config to localhost) and authenticates
with C(pve_vm_api_user) (bare user name, C(@<pve_vm_api_realm>) is appended), C(pve_vm_api_token_id),
C(pve_vm_api_token_secret) and C(pve_vm_api_host), applied through C(module_defaults), and with the header
C(PVEAPIToken=<user>@<realm>!<token_id>=<secret>) for the REST lookup, which the role derives from them in
C(vars/main.yml) (internal, not an input). The user and the token secret have no usable default: they are
asserted non-empty in the input validation, before any change. C(community.proxmox) and, on the controller,
the Python libraries C(proxmoxer) 2.3 or later and C(requests) must be installed. TLS certificates are not
verified.
- >-
Also reads C(ansible_host) (SSH wait), C(inventory_hostname) (the VM name, lowercased with underscores replaced by
dashes) and C(ansible_check_mode). The role sets the fact C(pve_vm_exists) for later roles and plays.
- >-
Cloud-init sets C(ciuser) from C(pve_vm_ci_user); an empty user is left out of the update and not compared for
drift. The role never sets a cloud-init password (C(cipassword)) and deletes one stored on the VM on a real run.
options:
pve_vm_node:
type: str
required: true
description:
- >-
Name of the Proxmox node that owns the VM. When it is also an inventory host, its C(ansible_host) is the
default of C(pve_vm_api_host).
pve_vm_vmid:
type: int
required: true
description:
- VM id on the Proxmox node. For a clone it is the new id.
pve_vm_state:
type: str
default: present
choices: [present, started, stopped, absent]
description:
- >-
C(present) keeps the VM configured without touching its power state. C(started) and C(stopped) also apply the
power state, and C(started) additionally waits for SSH and cloud-init when C(pve_vm_wait_for_guest) is true.
C(absent) deletes the VM, but only when C(pve_vm_allow_destroy) is true. Without it the role only looks the
VM up and changes nothing, because creation, disk detection, update and power state are gated on a state
other than C(absent).
pve_vm_allow_destroy:
type: bool
default: false
description:
- Safety switch required before C(pve_vm_state=absent) deletes the VM.
pve_vm_clone_vmid:
type: raw
description:
- >-
Template VM id to clone. Only read when the VM does not exist and the play is not in check mode. The type is
not fixed, so it can be given as a Jinja expression that resolves to the id.
pve_vm_full_clone:
type: bool
default: true
description:
- Full clone instead of a linked clone.
pve_vm_delegate:
type: str
default: localhost
description:
- Host that executes the Proxmox API module tasks. The REST lookup of the VM config always runs on localhost.
pve_vm_wait_for_guest:
type: bool
default: true
description:
- >-
When true and C(pve_vm_state) is started, wait for SSH on port 22 of C(ansible_host) and then for
C(cloud-init status --wait) on the guest.
pve_vm_agent:
type: bool
default: true
description:
- Enable the QEMU guest agent. Compared with the live config for drift.
pve_vm_onboot:
type: bool
default: true
description:
- Start the VM when the node boots. Compared with the live config for drift.
pve_vm_autostart:
type: bool
default: true
description:
- >-
Passed to the module as C(autostart) on update. Not compared for drift, because Proxmox does not return it in
the VM config.
pve_vm_memory:
type: raw
description:
- Memory in MB. Omitted from the update when undefined. Compared as an integer for drift.
pve_vm_cores:
type: raw
description:
- CPU cores. Omitted from the update when undefined. Compared as an integer for drift.
pve_vm_sockets:
type: raw
description:
- CPU sockets. Omitted from the update when undefined. Compared as an integer for drift.
pve_vm_network:
type: raw
description:
- >-
Mapping passed to the module as C(net), for example C(net0) with C(model), C(bridge), C(tag) and C(firewall).
Omitted when undefined. Only C(net0) is compared for drift.
pve_vm_ipconfig:
type: raw
description:
- >-
Mapping passed to the module as C(ipconfig), for example C(ipconfig0) with a string such as
C(ip=<address>/24,gw=<gateway>). Omitted when undefined. Only C(ipconfig0) is compared for drift, token order
ignored.
pve_vm_nameservers:
type: raw
description:
- Nameservers as a list, or a space or comma separated string. Omitted when undefined.
pve_vm_sshkeys:
type: str
description:
- >-
Public keys written to the cloud-init C(sshkeys) field, one per line. Omitted when undefined. Proxmox stores
them URL-encoded, so a change is not detected as drift and is only applied on a fresh clone, on other drift
or with C(pve_vm_force_update).
pve_vm_ci_user:
type: str
default: ""
description:
- >-
Cloud-init user (C(ciuser)). Left out of the update and not compared for drift when empty. Compared with the
live C(ciuser) otherwise.
pve_vm_force_update:
type: bool
default: false
description:
- Push cloud-init settings (user, sshkeys) and the whole configuration even without detected drift.
pve_vm_manage_disk:
type: bool
default: true
description:
- >-
Grow the boot disk to C(pve_vm_disk_size). While true, C(pve_vm_disk_size) must be set; the input validation
asserts it unless C(pve_vm_state) is absent.
pve_vm_disk_size:
type: raw
description:
- >-
Desired boot disk size, for example C(32G). Only the digits are compared with the current size in GB, and the
disk is only ever grown.
pve_vm_boot_disk:
type: str
default: scsi0
description:
- Disk key whose size is read and resized.
pve_vm_reboot_if_required:
type: bool
default: true
description:
- Restart the VM after its boot disk was grown.
pve_vm_api_user:
type: str
default: ""
description:
- >-
Proxmox API user, the bare name without realm (C(@<pve_vm_api_realm>) is appended). Required: the role
asserts it is non-empty before any change.
pve_vm_api_realm:
type: str
default: pam
description:
- Authentication realm of C(pve_vm_api_user), appended as C(@<realm>) in C(module_defaults) and in the REST header.
pve_vm_api_token_id:
type: str
description:
- >-
API token id, without the user part. Role default C(<pve_vm_api_user>-token), a Jinja expression in
C(defaults/main.yml), so it is not repeated here.
pve_vm_api_token_secret:
type: str
no_log: true
description:
- >-
API token secret, normally vaulted. No default. Required: the role asserts it is set and non-empty before
any change. Every task that carries it is C(no_log).
pve_vm_api_host:
type: str
description:
- >-
Address of the Proxmox API (port 8006). Role default the C(ansible_host) of C(pve_vm_node) from hostvars, or
empty when C(pve_vm_node) is undefined; a Jinja expression in C(defaults/main.yml), so it is not repeated
here. Set it explicitly when the node is not an inventory host.
+19
View File
@@ -0,0 +1,19 @@
---
galaxy_info:
role_name: pve_vm
namespace: mortis
author: Defame1297
license: GPL-3.0-or-later
description: Clone, configure, resize, start, stop and delete Proxmox VE QEMU VMs through the Proxmox API, with cloud-init settings and drift detection.
min_ansible_version: "2.22"
platforms:
- name: Ubuntu
versions:
- noble
- resolute
galaxy_tags:
- proxmox
- vm
- cloudinit
- provisioning
dependencies: []
@@ -0,0 +1,30 @@
---
# The validation and the drift detection only: main.yml would also call the Proxmox API to look
# the VM up and fetch its config, which the scenario does not exercise (README, Tests). The fetched
# config is seeded instead, as the fact detect_disk.yml sets from the REST lookup.
- name: Converge
hosts: all
gather_facts: false
tasks:
- name: Validate the inputs
ansible.builtin.include_role:
name: mortis.kamino.pve_vm
tasks_from: validate
vars:
pve_vm_disk_size: 32G
- name: Seed the live VM config the REST lookup would return
ansible.builtin.set_fact:
__pve_vm_config: "{{ pve_vm_test_config }}"
- name: Detect configuration drift
ansible.builtin.include_role:
name: mortis.kamino.pve_vm
tasks_from: detect_drift
- name: Assert the seeded config matches the inputs
ansible.builtin.assert:
that:
- not (__pve_vm_needs_update | bool)
fail_msg: The seeded config, which matches every input, was reported as drift
quiet: true
+107
View File
@@ -0,0 +1,107 @@
---
# Runs on the repository's own runner (label kamino-molecule), in the molecule-ubuntu2404
# (MOLECULE_IMAGE) and molecule-ubuntu2604 (MOLECULE_IMAGE_2604) images, pinned in
# .gitea/workflows/molecule.yml. The containers stand in for the guest: the role's input
# validation and its drift detection over a seeded VM config run against them. Nothing calls the
# Proxmox API (README, Tests). The containers run systemd as PID 1 with a writable cgroup; no
# privileged mode.
driver:
name: docker
platforms:
- name: ${KAMINO_RUN_ID:-local}-pve-vm-instance
labels:
net.rkdr.mortis.molecule-run: "${KAMINO_RUN_ID:-local}"
image: ${MOLECULE_IMAGE}
pre_build_image: true
pull: true
command: /sbin/init
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
tmpfs:
- /run
- /run/lock
security_opts:
- apparmor=unconfined
- name: ${KAMINO_RUN_ID:-local}-pve-vm-2604-instance
labels:
net.rkdr.mortis.molecule-run: "${KAMINO_RUN_ID:-local}"
image: ${MOLECULE_IMAGE_2604}
pre_build_image: true
pull: true
command: /sbin/init
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
tmpfs:
- /run
- /run/lock
security_opts:
- apparmor=unconfined
provisioner:
name: ansible
# One source for every play, so the converge, the drift cases and the negative tests in
# verify.yml start from the same valid input, which matches the seeded VM config of converge.yml.
inventory:
group_vars:
all:
pve_vm_node: pve-node
pve_vm_vmid: 9200
# The node is not an inventory host, from which the role defaults the API address;
# argument validation templates that default, so main would fail on it instead.
pve_vm_api_host: 192.0.2.1
pve_vm_api_user: molecule
pve_vm_api_token_secret: not-a-secret
# pve_vm_disk_size is set where a case needs it, so the refusal case can leave it undefined.
pve_vm_state: started
pve_vm_memory: 2048
pve_vm_cores: 2
pve_vm_sockets: 1
pve_vm_ci_user: ubuntu
pve_vm_sshkeys: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMoleculeTestKeyNotARealKey molecule
pve_vm_network:
net0:
model: virtio
bridge: vmbr0
tag: 20
firewall: true
pve_vm_ipconfig:
ipconfig0: ip=192.0.2.30/24,gw=192.0.2.1
pve_vm_nameservers:
- 192.0.2.53
- 198.51.100.53
# The live config the REST lookup would return, in Proxmox's own forms: agent with flags,
# ipconfig0 tokens reordered, sshkeys URL-encoded, nameservers space-separated.
pve_vm_test_config:
name: "{{ inventory_hostname | lower | replace('_', '-') }}"
cpu: host
memory: 2048
cores: 2
sockets: 1
ciuser: ubuntu
sshkeys: ssh-ed25519%20AAAAC3NzaC1lZDI1NTE5AAAAIMoleculeTestKeyNotARealKey%20molecule%0A
ipconfig0: gw=192.0.2.1,ip=192.0.2.30/24
nameserver: 192.0.2.53 198.51.100.53
onboot: 1
agent: fstrim_cloned_disks=1,enabled=1
net0: virtio=BC:24:11:00:00:01,bridge=vmbr0,firewall=1,tag=20
scsi0: local-lvm:vm-9200-disk-0,size=32G
verifier:
name: ansible
scenario:
# molecule's default sequence minus both destroys (scripts/run_molecule_scenarios.sh removes the
# containers as soon as this scenario ends; after a local run, run `molecule destroy` yourself),
# plus a check before the converge (fresh host) and one after it (converged host).
test_sequence:
- dependency
- cleanup
- syntax
- create
- prepare
- check
- converge
- check
- idempotence
- side_effect
- verify
- cleanup
@@ -0,0 +1,24 @@
---
# One drift case: seeds the live VM config the REST lookup would return, runs the role's drift
# detection with the inputs the caller sets on the include, and asserts each expected drift fact.
# Input: pve_vm_test_case (name, config, expect: a mapping of drift dimension to true or false,
# needs_update for the combined result).
- name: "Seed the live VM config, case {{ pve_vm_test_case.name }}"
ansible.builtin.set_fact:
__pve_vm_config: "{{ pve_vm_test_case.config }}"
- name: "Detect configuration drift, case {{ pve_vm_test_case.name }}"
ansible.builtin.include_role:
name: mortis.kamino.pve_vm
tasks_from: detect_drift
- name: "Assert the drift facts, case {{ pve_vm_test_case.name }}"
ansible.builtin.assert:
that: (lookup('ansible.builtin.vars', pve_vm_test_fact) | bool) == (item.value | bool)
fail_msg: "{{ pve_vm_test_fact }} is {{ lookup('ansible.builtin.vars', pve_vm_test_fact) }}, expected {{ item.value }}"
quiet: true
vars:
pve_vm_test_fact: "{{ '__pve_vm_needs_update' if item.key == 'needs_update' else '__pve_vm_drift_' ~ item.key }}"
loop: "{{ pve_vm_test_case.expect | dict2items }}"
loop_control:
label: "{{ item.key }}"
@@ -0,0 +1,22 @@
---
# One failing run: includes the role's task file named by the case, with the inputs the caller
# sets on the include, and asserts that the expected message, not something else, stopped it.
# Input: pve_vm_test_case (name, tasks_from, expect).
- name: "Run the role, case {{ pve_vm_test_case.name }}"
block:
- name: "Include the role, case {{ pve_vm_test_case.name }}"
ansible.builtin.include_role:
name: mortis.kamino.pve_vm
tasks_from: "{{ pve_vm_test_case.tasks_from }}"
# Only reached when the include returned. The message must not contain the expected
# text, so the rescue below cannot mistake it for the failure under test.
- name: "Fail because the include returned, case {{ pve_vm_test_case.name }}"
ansible.builtin.fail:
msg: The role accepted the input
rescue:
- name: "The expected failure stopped the run, case {{ pve_vm_test_case.name }}"
ansible.builtin.assert:
that: pve_vm_test_case.expect in (ansible_failed_result.msg | default(''))
fail_msg: "Expected '{{ pve_vm_test_case.expect }}', got: {{ ansible_failed_result.msg | default('') }}"
quiet: true
@@ -0,0 +1,15 @@
---
# One level of the static check's flattening: moves the pending tasks into pve_vm_test_tasks and
# makes their block, rescue and always lists the next pending ones, then recurses until none is left.
# Both facts are templated from the values before this task.
- name: Flatten one level of blocks
ansible.builtin.set_fact:
pve_vm_test_tasks: "{{ [pve_vm_test_tasks, pve_vm_test_pending] | flatten(levels=1) }}"
pve_vm_test_pending: >-
{{ [pve_vm_test_pending | map(attribute='block', default=[]) | list,
pve_vm_test_pending | map(attribute='rescue', default=[]) | list,
pve_vm_test_pending | map(attribute='always', default=[]) | list] | flatten(levels=2) }}
- name: Flatten the next level
ansible.builtin.include_tasks: flatten_tasks.yml
when: pve_vm_test_pending | length > 0
+323
View File
@@ -0,0 +1,323 @@
---
# The refusal cases run first: each fails in the input validation, before any API call.
- name: Refuse invalid input
hosts: all
gather_facts: false
tasks:
- name: Refuse a state outside the argument spec choices
ansible.builtin.include_tasks: tasks/failed_run.yml
vars:
pve_vm_state: running
pve_vm_test_case:
name: state-choice
tasks_from: main
expect: pve_vm_state must be one of
- name: Refuse a run without an API user
ansible.builtin.include_tasks: tasks/failed_run.yml
vars:
pve_vm_api_user: ""
pve_vm_test_case:
name: no-api-user
tasks_from: main
expect: The Proxmox API calls need pve_vm_api_user
- name: Refuse a run without an API token secret
ansible.builtin.include_tasks: tasks/failed_run.yml
vars:
pve_vm_api_token_secret: ""
pve_vm_test_case:
name: no-token-secret
tasks_from: main
expect: The Proxmox API calls need pve_vm_api_user
- name: Refuse a deletion without an API token secret
ansible.builtin.include_tasks: tasks/failed_run.yml
vars:
pve_vm_state: absent
pve_vm_api_token_secret: ""
pve_vm_test_case:
name: absent-no-token-secret
tasks_from: validate
expect: The Proxmox API calls need pve_vm_api_user
- name: Refuse a managed disk without a size
ansible.builtin.include_tasks: tasks/failed_run.yml
vars:
pve_vm_test_case:
name: no-disk-size
tasks_from: validate
expect: pve_vm_disk_size (for example 32G) must be set
- name: Refuse a VM id that is not a number
ansible.builtin.include_tasks: tasks/failed_run.yml
vars:
pve_vm_vmid: not-a-number
pve_vm_test_case:
name: vmid-type
tasks_from: main
expect: pve_vm_vmid
# create.yml is reached only after the API lookup found no VM; its assert precedes the clone.
- name: Refuse a clone without a template id
ansible.builtin.include_tasks: tasks/failed_run.yml
vars:
pve_vm_test_case:
name: no-clone-vmid
tasks_from: create
expect: which needs pve_vm_clone_vmid
- name: Accept valid input
hosts: all
gather_facts: false
tasks:
- name: Accept an unmanaged disk without a size
ansible.builtin.include_role:
name: mortis.kamino.pve_vm
tasks_from: validate
vars:
pve_vm_manage_disk: false
- name: Accept a deletion without a disk size
ansible.builtin.include_role:
name: mortis.kamino.pve_vm
tasks_from: validate
vars:
pve_vm_state: absent
- name: Detect drift on a seeded VM config
hosts: all
gather_facts: false
vars:
pve_vm_test_no_drift:
forced: false
missing_keys: false
name: false
cpu: false
resources: false
ciuser: false
ipconfig: false
nameservers: false
onboot: false
agent: false
network: false
needs_update: false
tasks:
- name: Report no drift when the live config matches
ansible.builtin.include_tasks: tasks/drift_case.yml
vars:
pve_vm_test_case:
name: match
config: "{{ pve_vm_test_config }}"
expect: "{{ pve_vm_test_no_drift }}"
- name: Ignore the live ciuser while pve_vm_ci_user is empty
ansible.builtin.include_tasks: tasks/drift_case.yml
vars:
pve_vm_ci_user: ""
pve_vm_test_case:
name: ciuser-empty
config: "{{ pve_vm_test_config | combine({'ciuser': 'someone-else'}) }}"
expect: "{{ pve_vm_test_no_drift }}"
- name: Ignore a missing live ciuser while pve_vm_ci_user is empty
ansible.builtin.include_tasks: tasks/drift_case.yml
vars:
pve_vm_ci_user: ""
pve_vm_test_case:
name: ciuser-empty-unset
config: "{{ pve_vm_test_config | dict2items | rejectattr('key', 'eq', 'ciuser') | items2dict }}"
expect: "{{ pve_vm_test_no_drift }}"
- name: Report a live ciuser other than pve_vm_ci_user
ansible.builtin.include_tasks: tasks/drift_case.yml
vars:
pve_vm_ci_user: admin
pve_vm_test_case:
name: ciuser-changed
config: "{{ pve_vm_test_config }}"
expect: "{{ pve_vm_test_no_drift | combine({'ciuser': true, 'needs_update': true}) }}"
- name: Report a live config without ciuser
ansible.builtin.include_tasks: tasks/drift_case.yml
vars:
pve_vm_test_case:
name: ciuser-missing
config: "{{ pve_vm_test_config | dict2items | rejectattr('key', 'eq', 'ciuser') | items2dict }}"
expect: "{{ pve_vm_test_no_drift | combine({'missing_keys': true, 'ciuser': true, 'needs_update': true}) }}"
- name: Report a live config without sshkeys
ansible.builtin.include_tasks: tasks/drift_case.yml
vars:
pve_vm_test_case:
name: sshkeys-missing
config: "{{ pve_vm_test_config | dict2items | rejectattr('key', 'eq', 'sshkeys') | items2dict }}"
expect: "{{ pve_vm_test_no_drift | combine({'missing_keys': true, 'needs_update': true}) }}"
# Proxmox stores sshkeys URL-encoded, so a rotated key is not drift; pve_vm_force_update pushes it.
- name: Report no drift for rotated sshkeys
ansible.builtin.include_tasks: tasks/drift_case.yml
vars:
pve_vm_sshkeys: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIRotatedTestKeyNotARealKey molecule
pve_vm_test_case:
name: sshkeys-rotated
config: "{{ pve_vm_test_config }}"
expect: "{{ pve_vm_test_no_drift }}"
- name: Expect no sshkeys in the live config while pve_vm_sshkeys is empty
ansible.builtin.include_tasks: tasks/drift_case.yml
vars:
pve_vm_sshkeys: ""
pve_vm_test_case:
name: sshkeys-empty
config: "{{ pve_vm_test_config | dict2items | rejectattr('key', 'eq', 'sshkeys') | items2dict }}"
expect: "{{ pve_vm_test_no_drift }}"
- name: Report forced drift with pve_vm_force_update
ansible.builtin.include_tasks: tasks/drift_case.yml
vars:
pve_vm_force_update: true
pve_vm_test_case:
name: forced
config: "{{ pve_vm_test_config }}"
expect: "{{ pve_vm_test_no_drift | combine({'forced': true, 'needs_update': true}) }}"
- name: Read Proxmox's other forms as no drift
ansible.builtin.include_tasks: tasks/drift_case.yml
vars:
pve_vm_nameservers: 192.0.2.53,198.51.100.53
pve_vm_test_case:
name: other-forms
config: "{{ pve_vm_test_config | combine({'cpu': 'cputype=host,flags=+aes', 'agent': '1'}) }}"
expect: "{{ pve_vm_test_no_drift }}"
- name: Report drift in each compared dimension
ansible.builtin.include_tasks: tasks/drift_case.yml
vars:
pve_vm_test_case:
name: all-dimensions
config: >-
{{ pve_vm_test_config | combine({'name': 'other-name', 'cpu': 'kvm64', 'memory': 1024,
'ipconfig0': 'ip=192.0.2.31/24,gw=192.0.2.1', 'nameserver': '192.0.2.53', 'onboot': 0,
'agent': 'enabled=0', 'net0': 'virtio=BC:24:11:00:00:01,bridge=vmbr1,tag=20'}) }}
expect:
forced: false
missing_keys: false
name: true
cpu: true
resources: true
ciuser: false
ipconfig: true
nameservers: true
onboot: true
agent: true
network: true
needs_update: true
- name: Report a live VLAN tag that the inputs drop
ansible.builtin.include_tasks: tasks/drift_case.yml
vars:
pve_vm_network:
net0:
model: virtio
bridge: vmbr0
firewall: true
pve_vm_test_case:
name: tag-dropped
config: "{{ pve_vm_test_config }}"
expect: "{{ pve_vm_test_no_drift | combine({'network': true, 'needs_update': true}) }}"
# Static: the role must never send a cloud-init password, and its delete of a stored one must not
# log the task, so these read the role's own task files on the controller.
- name: Verify the role's cloud-init password handling
hosts: localhost
gather_facts: false
vars:
pve_vm_test_task_dir: "{{ (playbook_dir ~ '/../../tasks') | realpath }}"
# Every name a task can call the module by.
pve_vm_test_kvm_names:
- community.proxmox.proxmox_kvm
- community.general.proxmox_kvm
- ansible.legacy.proxmox_kvm
- proxmox_kvm
tasks:
- name: Find the role's task files, subdirectories included
ansible.builtin.find:
paths: "{{ pve_vm_test_task_dir }}"
patterns: ["*.yml", "*.yaml"]
recurse: true
register: pve_vm_test_files
- name: Read the role's task files
ansible.builtin.set_fact:
pve_vm_test_pending: >-
{{ [pve_vm_test_pending | default([]),
lookup('ansible.builtin.file', item) | from_yaml] | flatten(levels=1) }}
loop: "{{ pve_vm_test_files.files | map(attribute='path') | sort }}"
- name: Start the flattened task list
ansible.builtin.set_fact:
pve_vm_test_tasks: []
# Recurses through block, rescue and always to any depth.
- name: Flatten the blocks
ansible.builtin.include_tasks: tasks/flatten_tasks.yml
# A task calls the module by its key, or through action or local_action, either a mapping
# with module or a string that starts with the module name. Its args are merged in.
- name: Summarise each proxmox_kvm task
ansible.builtin.set_fact:
pve_vm_test_kvm: >-
{{ pve_vm_test_kvm | default([]) + [{
'name': item.name | default('(unnamed)'),
'sends': ('cipassword' in pve_vm_test_args)
or (pve_vm_test_raw is string and 'cipassword=' in pve_vm_test_raw),
'deletes': ('cipassword' in (pve_vm_test_args.delete | default('') | string).split(','))
or (pve_vm_test_raw is string and pve_vm_test_raw is search('delete=\\S*cipassword')),
'no_log': item.no_log | default(false) | bool,
}] }}
vars:
pve_vm_test_key: "{{ pve_vm_test_kvm_names | select('in', item) | first | default('') }}"
pve_vm_test_action: "{{ item.action | default(item.local_action | default('')) }}"
pve_vm_test_action_kvm: >-
{{ (pve_vm_test_action is mapping and pve_vm_test_action.module | default('') in pve_vm_test_kvm_names)
or (pve_vm_test_action is string and (pve_vm_test_action.split() | first | default('')) in pve_vm_test_kvm_names) }}
pve_vm_test_raw: >-
{{ item[pve_vm_test_key] if pve_vm_test_key
else (pve_vm_test_action | dict2items | rejectattr('key', 'eq', 'module') | items2dict
if pve_vm_test_action is mapping else pve_vm_test_action) }}
pve_vm_test_args: >-
{{ (pve_vm_test_raw if pve_vm_test_raw is mapping else {}) | combine(item.args | default({})) }}
loop: "{{ pve_vm_test_tasks }}"
loop_control:
label: "{{ item.name | default('(unnamed)') }}"
when: pve_vm_test_key | length > 0 or pve_vm_test_action_kvm | bool
- name: Assert no proxmox_kvm task sends cipassword
ansible.builtin.assert:
that:
- pve_vm_test_kvm | default([]) | length > 0
- pve_vm_test_kvm | selectattr('sends') | list | length == 0
fail_msg: "proxmox_kvm tasks sending cipassword: {{ pve_vm_test_kvm | default([]) | selectattr('sends') | map(attribute='name') | list }}"
quiet: true
# Any module, any spelling or group: no default the role sets may carry cipassword.
- name: Assert no module_defaults sets cipassword
ansible.builtin.assert:
that:
- >-
[item.module_defaults] | flatten(levels=1) | map('dict2items') | flatten(levels=1)
| map(attribute='value') | select('contains', 'cipassword') | list | length == 0
fail_msg: "module_defaults with cipassword on '{{ item.name | default('(unnamed)') }}'"
quiet: true
loop: "{{ pve_vm_test_tasks | selectattr('module_defaults', 'defined') | list }}"
loop_control:
label: "{{ item.name | default('(unnamed)') }}"
- name: Assert the stored cipassword is deleted by one no_log task
ansible.builtin.assert:
that:
- pve_vm_test_kvm | selectattr('deletes') | list | length == 1
- pve_vm_test_kvm | selectattr('deletes') | selectattr('no_log') | list | length == 1
fail_msg: "Tasks deleting cipassword: {{ pve_vm_test_kvm | selectattr('deletes') | list }}"
quiet: true
+29
View File
@@ -0,0 +1,29 @@
---
# Here, not in validate.yml: whether a clone happens is known only after the API lookup.
- name: Assert the template to clone is set
ansible.builtin.assert:
that:
- pve_vm_clone_vmid is defined
fail_msg: >-
VM {{ pve_vm_vmid }} does not exist on {{ pve_vm_node }}, so it is cloned, which needs
pve_vm_clone_vmid, the VM id of the template. Set it, or create the VM by other means.
quiet: true
- name: Clone VM from template
no_log: true # carries the API token secret
delegate_to: "{{ pve_vm_delegate }}"
community.proxmox.proxmox_kvm:
node: "{{ pve_vm_node }}"
clone: template
vmid: "{{ pve_vm_clone_vmid }}"
newid: "{{ pve_vm_vmid }}"
name: "{{ inventory_hostname | lower | replace('_', '-') }}"
full: "{{ pve_vm_full_clone }}"
timeout: 600
state: present
register: __pve_vm_clone
- name: Record that the VM was just cloned
ansible.builtin.set_fact:
# Forces one cloud-init update (ciuser, sshkeys) in update.yml.
__pve_vm_created: "{{ __pve_vm_clone is changed }}"
+23
View File
@@ -0,0 +1,23 @@
---
- name: Stop VM before deletion (if running)
no_log: true # defence in depth: the module already masks the API token secret
delegate_to: "{{ pve_vm_delegate }}"
community.proxmox.proxmox_kvm:
node: "{{ pve_vm_node }}"
vmid: "{{ pve_vm_vmid }}"
state: stopped
when:
- pve_vm_exists
- not ansible_check_mode
- name: Delete VM
no_log: true # defence in depth: the module already masks the API token secret
delegate_to: "{{ pve_vm_delegate }}"
community.proxmox.proxmox_kvm:
node: "{{ pve_vm_node }}"
vmid: "{{ pve_vm_vmid }}"
state: absent
when:
- pve_vm_exists
- not ansible_check_mode
register: __pve_vm_delete
+37
View File
@@ -0,0 +1,37 @@
---
# no_log hides the whole failure of the lookup below, so the operator would only see "output hidden
# due to no_log". The rescue re-raises just the module's msg, which is safe to show: the module
# masks the token secret in everything it returns (its invocation echo is not used here).
- name: Look up the VM
block:
- name: Check if VM exists
no_log: true # defence in depth: the module already masks the API token secret
delegate_to: "{{ pve_vm_delegate }}"
community.proxmox.proxmox_kvm:
node: "{{ pve_vm_node }}"
vmid: "{{ pve_vm_vmid }}"
state: current
register: __pve_vm_info
# proxmox_kvm declares no check mode support, so --check would skip this lookup, leave
# pve_vm_exists false and skip everything after it. state=current only reads (GET of the VM
# and its status), so it runs for real under --check as well.
check_mode: false
# An absent VM is an expected answer here: for state=current the module fails with
# "VM with vmid <id> does not exist in cluster". Any other failure (API, auth, network) is
# real and must stop the run instead of being read as "VM absent", which would send
# create.yml after an existing VM.
failed_when:
- __pve_vm_info.failed | default(false)
- "'does not exist in cluster' not in (__pve_vm_info.msg | default(''))"
changed_when: false
rescue:
- name: Fail with the module message
ansible.builtin.fail:
msg: >-
Looking up VM {{ pve_vm_vmid }} on {{ pve_vm_node }} failed:
{{ ansible_failed_result.msg | default('no message') }}
- name: Set VM existence fact
ansible.builtin.set_fact:
pve_vm_exists: >-
{{ __pve_vm_info.vmid is defined or __pve_vm_info.status is defined }}
+47
View File
@@ -0,0 +1,47 @@
---
- name: Get current VM config via REST API
no_log: true # Authorization header carries the API token
delegate_to: localhost
ansible.builtin.uri:
url: "https://{{ pve_vm_api_host }}:8006/api2/json/nodes/{{ pve_vm_node }}/qemu/{{ pve_vm_vmid }}/config"
method: GET
headers:
Authorization: "{{ __pve_vm_api_auth_header }}"
register: __pve_vm_current_config
# uri has no check mode support; this is a GET, so it also runs under --check and drift
# detection sees the live config.
check_mode: false
- name: Set fact to the actual config dict
no_log: true # the config may hold a stored cipassword (update.yml deletes it)
ansible.builtin.set_fact:
__pve_vm_config: "{{ __pve_vm_current_config.json.data }}"
- name: Extract current disk string
ansible.builtin.set_fact:
__pve_vm_disk_string: "{{ __pve_vm_config[pve_vm_boot_disk] | default('') }}"
- name: Extract current disk number and unit properly
ansible.builtin.set_fact:
__pve_vm_disk_parts: "{{ __pve_vm_disk_string | regex_findall('size=(\\d+)([GM])') | first | default(['0', 'G']) | list }}"
- name: Extract current disk number
ansible.builtin.set_fact:
__pve_vm_current_disk_size_number: "{{ __pve_vm_disk_parts[0] | int }}"
__pve_vm_current_disk_size_unit: "{{ __pve_vm_disk_parts[1] }}"
- name: Convert disk size to GB
ansible.builtin.set_fact:
__pve_vm_current_disk: >-
{{
__pve_vm_current_disk_size_number if __pve_vm_current_disk_size_unit == 'G'
else (__pve_vm_current_disk_size_number / 1024)
}}
- name: Determine if disk resize is needed
ansible.builtin.set_fact:
__pve_vm_resize_disk: "{{ pve_vm_disk_size | regex_replace('[^0-9]', '') | int > __pve_vm_current_disk | int }}"
when:
- pve_vm_manage_disk | bool
- pve_vm_disk_size is defined
- pve_vm_exists
+97
View File
@@ -0,0 +1,97 @@
---
# community.proxmox.proxmox_kvm with `update: true` reports changed on every run: it does not diff
# against the live config. Compare the config already fetched in detect_disk.yml with the desired
# values and only call the module on real drift or while cloud-init is still unconfigured (first
# run after a clone, when ciuser and sshkeys have to be applied once). Proxmox stores sshkeys
# URL-encoded, so a change is not diffed: pve_vm_force_update pushes it to an existing VM.
- name: Normalise current QEMU guest agent setting
ansible.builtin.set_fact:
# PVE returns "1", "enabled=1" or e.g. "fstrim_cloned_disks=1,enabled=1"; enabled=1 may sit
# in any position.
__pve_vm_agent_current: >-
{{
'1' if ((__pve_vm_config.agent | default('0') | string).split(',')
| select('in', ['1', 'enabled=1']) | list | length > 0)
else '0'
}}
- name: Normalise desired and current values for drift comparison
ansible.builtin.set_fact:
# ciuser and sshkeys are only expected in the current config when the role sets them.
__pve_vm_required_config_keys: >-
{{
(['ciuser'] if (pve_vm_ci_user | string | length > 0) else [])
+ (['sshkeys'] if (pve_vm_sshkeys | default('') | string | length > 0) else [])
}}
# PVE returns nameserver space-separated; accept a list or a comma-separated string as well.
__pve_vm_nameservers_desired: >-
{{
((pve_vm_nameservers | join(' '))
if (pve_vm_nameservers | default('') is not string and pve_vm_nameservers | default('') is iterable)
else (pve_vm_nameservers | default('') | string))
| replace(',', ' ') | split | join(' ')
}}
# ipconfig0 tokens can come back from PVE in a different order.
__pve_vm_ipconfig0_current: "{{ (__pve_vm_config.ipconfig0 | default('') | string).split(',') | sort }}"
__pve_vm_ipconfig0_desired: "{{ (pve_vm_ipconfig.ipconfig0 | default('') | string).split(',') | sort }}"
__pve_vm_net0_current: "{{ (__pve_vm_config.net0 | default('') | string).split(',') }}"
# autostart is not compared: PVE has no such VM config key (the config API does not return it).
# One fact per drift dimension, combined in __pve_vm_needs_update below.
- name: Determine drift per configuration dimension
ansible.builtin.set_fact:
__pve_vm_drift_forced: >-
{{
(pve_vm_force_update | bool)
or (__pve_vm_created | default(false) | bool)
}}
__pve_vm_drift_missing_keys: "{{ __pve_vm_required_config_keys | reject('in', __pve_vm_config) | list | length > 0 }}"
__pve_vm_drift_name: "{{ (__pve_vm_config.name | default('')) != (inventory_hostname | lower | replace('_', '-')) }}"
# PVE may return "host" or "cputype=host" (optionally followed by flags).
__pve_vm_drift_cpu: >-
{{
(__pve_vm_config.cpu | default('') | string).split(',')[0] | regex_replace('^cputype=', '') != 'host'
}}
__pve_vm_drift_resources: >-
{{
(pve_vm_memory is defined and (__pve_vm_config.memory | default(0) | int) != (pve_vm_memory | int))
or (pve_vm_cores is defined and (__pve_vm_config.cores | default(1) | int) != (pve_vm_cores | int))
or (pve_vm_sockets is defined and (__pve_vm_config.sockets | default(1) | int) != (pve_vm_sockets | int))
}}
__pve_vm_drift_ciuser: "{{ (pve_vm_ci_user | string | length > 0) and __pve_vm_config.ciuser | default('') != pve_vm_ci_user }}"
__pve_vm_drift_ipconfig: "{{ pve_vm_ipconfig.ipconfig0 is defined and __pve_vm_ipconfig0_current != __pve_vm_ipconfig0_desired }}"
__pve_vm_drift_nameservers: >-
{{ pve_vm_nameservers is defined and (__pve_vm_config.nameserver | default('')) != __pve_vm_nameservers_desired }}
__pve_vm_drift_onboot: "{{ (__pve_vm_config.onboot | default(0) | int) != (pve_vm_onboot | bool | int) }}"
__pve_vm_drift_agent: "{{ __pve_vm_agent_current != ((pve_vm_agent | bool | int) | string) }}"
__pve_vm_drift_network: >-
{{
pve_vm_network.net0 is defined and (
not (__pve_vm_config.net0 | default('')).startswith(pve_vm_network.net0.model | default('virtio') ~ '=')
or (pve_vm_network.net0.bridge is defined
and ('bridge=' ~ pve_vm_network.net0.bridge) not in __pve_vm_net0_current)
or (pve_vm_network.net0.tag is defined
and ('tag=' ~ pve_vm_network.net0.tag) not in __pve_vm_net0_current)
or (pve_vm_network.net0.tag is not defined
and (__pve_vm_net0_current | select('match', '^tag=') | list | length > 0))
or (pve_vm_network.net0.firewall is defined
and (('firewall=1' in __pve_vm_net0_current) != (pve_vm_network.net0.firewall | bool)))
)
}}
- name: Determine if VM configuration needs updating
ansible.builtin.set_fact:
__pve_vm_needs_update: >-
{{
__pve_vm_drift_forced | bool
or __pve_vm_drift_missing_keys | bool
or __pve_vm_drift_name | bool
or __pve_vm_drift_cpu | bool
or __pve_vm_drift_resources | bool
or __pve_vm_drift_ciuser | bool
or __pve_vm_drift_ipconfig | bool
or __pve_vm_drift_nameservers | bool
or __pve_vm_drift_onboot | bool
or __pve_vm_drift_agent | bool
or __pve_vm_drift_network | bool
}}
+90
View File
@@ -0,0 +1,90 @@
---
# Validation first, under always, so a bad input fails before any change whatever tags the run
# selects.
- name: Validate the role inputs
ansible.builtin.import_tasks: validate.yml
tags: always
# Every Proxmox API call of the role is inside this block, so the credentials are set once here
# instead of on each task; module_defaults set on a block reach tasks run through include_tasks.
# They are templated per task and no secret is stored as a fact. The uri call (detect_disk) takes
# host and header explicitly.
- name: Manage Proxmox VM lifecycle
module_defaults:
community.proxmox.proxmox_kvm:
api_user: "{{ pve_vm_api_user }}@{{ pve_vm_api_realm }}"
api_token_id: "{{ pve_vm_api_token_id }}"
api_token_secret: "{{ pve_vm_api_token_secret }}"
api_host: "{{ pve_vm_api_host }}"
validate_certs: false
community.proxmox.proxmox_disk:
api_user: "{{ pve_vm_api_user }}@{{ pve_vm_api_realm }}"
api_token_id: "{{ pve_vm_api_token_id }}"
api_token_secret: "{{ pve_vm_api_token_secret }}"
api_host: "{{ pve_vm_api_host }}"
validate_certs: false
ansible.builtin.uri:
validate_certs: false
block:
- name: Gather current VM information
ansible.builtin.include_tasks: detect.yml
- name: Remove VM if destruction is requested
ansible.builtin.include_tasks: delete.yml
when:
- pve_vm_state == "absent"
- pve_vm_allow_destroy | bool
- pve_vm_exists
- name: Stop processing for deleted VM
ansible.builtin.meta: end_host
when:
- pve_vm_state == "absent"
- pve_vm_allow_destroy | bool
- name: Create VM if it does not exist
ansible.builtin.include_tasks: create.yml
when:
- pve_vm_state != "absent"
- not pve_vm_exists
- not ansible_check_mode
- name: Preview VM creation
ansible.builtin.debug:
msg: >-
VM {{ pve_vm_vmid }} does not exist on {{ pve_vm_node }}: a real run clones it from template
{{ pve_vm_clone_vmid | default('(unset)') }} and then configures it. Nothing after the lookup runs for it
in this check.
changed_when: true
when:
- pve_vm_state != "absent"
- not pve_vm_exists
- ansible_check_mode
- name: Refresh VM information after changes
ansible.builtin.include_tasks: detect.yml
- name: Gather current VM disk information
ansible.builtin.include_tasks: detect_disk.yml
when:
- pve_vm_exists
- pve_vm_state != "absent"
- name: Update existing VM configuration
ansible.builtin.include_tasks: update.yml
when:
- pve_vm_state != "absent"
- pve_vm_exists
- name: Ensure VM power state
ansible.builtin.include_tasks: state.yml
when:
- pve_vm_exists
- pve_vm_state in ["started", "stopped"]
- name: Wait for VM to become ready
ansible.builtin.include_tasks: wait.yml
when:
- pve_vm_exists
- pve_vm_state == "started"
- pve_vm_wait_for_guest | bool
+18
View File
@@ -0,0 +1,18 @@
---
# Under --check the module (no check mode support) does not run; the preview compares the status the
# lookup in detect.yml read with the desired state.
- name: Preview VM power state
ansible.builtin.debug:
msg: "VM {{ pve_vm_vmid }} is {{ __pve_vm_info.status | default('unknown') }}, desired {{ pve_vm_state }}"
changed_when: >-
(__pve_vm_info.status | default('unknown')) != ('running' if pve_vm_state == 'started' else 'stopped')
when: ansible_check_mode
- name: Ensure VM state
no_log: true # defence in depth: the module already masks the API token secret
delegate_to: "{{ pve_vm_delegate }}"
community.proxmox.proxmox_kvm:
node: "{{ pve_vm_node }}"
vmid: "{{ pve_vm_vmid }}"
state: "{{ pve_vm_state }}"
when: not ansible_check_mode
+126
View File
@@ -0,0 +1,126 @@
---
- name: Detect VM configuration drift
ansible.builtin.include_tasks: detect_drift.yml
# Names only, no values: the drift facts are booleans, and sshkeys are never compared.
# Under --check this is the preview of the update and resize below (changed when either would run).
- name: Report configuration drift
ansible.builtin.debug:
msg: >-
{{
'drift: ' ~ (__pve_vm_drift_dimensions | join(', ')) if __pve_vm_drift_dimensions | length > 0
else 'no drift'
}}{{
'; boot disk resize: ' ~ __pve_vm_current_disk ~ 'G -> ' ~ pve_vm_disk_size
if (pve_vm_manage_disk and __pve_vm_resize_disk | default(false) | bool) else ''
}}
vars:
__pve_vm_drift_dimensions: >-
{{
[
'forced' if __pve_vm_drift_forced | bool else '',
'missing_keys' if __pve_vm_drift_missing_keys | bool else '',
'name' if __pve_vm_drift_name | bool else '',
'cpu' if __pve_vm_drift_cpu | bool else '',
'resources' if __pve_vm_drift_resources | bool else '',
'ciuser' if __pve_vm_drift_ciuser | bool else '',
'ipconfig' if __pve_vm_drift_ipconfig | bool else '',
'nameservers' if __pve_vm_drift_nameservers | bool else '',
'onboot' if __pve_vm_drift_onboot | bool else '',
'agent' if __pve_vm_drift_agent | bool else '',
'network' if __pve_vm_drift_network | bool else '',
] | select | list
}}
changed_when: >-
ansible_check_mode and (__pve_vm_needs_update | bool
or (pve_vm_manage_disk and __pve_vm_resize_disk | default(false) | bool))
- name: Update VM configuration
no_log: true # carries the API token secret
delegate_to: "{{ pve_vm_delegate }}"
community.proxmox.proxmox_kvm:
node: "{{ pve_vm_node }}"
vmid: "{{ pve_vm_vmid }}"
name: "{{ inventory_hostname | lower | replace('_', '-') }}"
memory: "{{ pve_vm_memory | default(omit) }}"
cores: "{{ pve_vm_cores | default(omit) }}"
sockets: "{{ pve_vm_sockets | default(omit) }}"
cpu: host
net: "{{ pve_vm_network | default(omit) }}"
ciuser: "{{ pve_vm_ci_user if (pve_vm_ci_user | length > 0) else omit }}"
ipconfig: "{{ pve_vm_ipconfig | default(omit) }}"
sshkeys: "{{ pve_vm_sshkeys | default(omit) }}"
nameservers: "{{ pve_vm_nameservers | default(omit) }}"
agent: "{{ pve_vm_agent }}"
onboot: "{{ pve_vm_onboot }}"
autostart: "{{ pve_vm_autostart }}"
update: true
state: present
# Explicit: the module has no check mode support, so --check skips it anyway; the report above is the preview.
when:
- __pve_vm_needs_update | bool
- not ansible_check_mode
# The role never sets a cloud-init password; a VM configured by other means may still have one
# stored. The module cannot combine delete with update, has no check mode and always reports
# changed, hence a separate task, run only when the key is present, with the debug as its --check
# preview.
- name: Preview deletion of the stored cloud-init password
ansible.builtin.debug:
msg: "cipassword stored on VM {{ pve_vm_vmid }}: a real run deletes it"
changed_when: true
when:
- "'cipassword' in __pve_vm_config"
- ansible_check_mode
- name: Delete the stored cloud-init password
no_log: true # carries the API token secret
delegate_to: "{{ pve_vm_delegate }}"
community.proxmox.proxmox_kvm:
node: "{{ pve_vm_node }}"
vmid: "{{ pve_vm_vmid }}"
delete: cipassword
when:
- "'cipassword' in __pve_vm_config"
- not ansible_check_mode
# The marker has been consumed by drift detection and the update above; reset it so another
# pve_vm run for this host in the same play does not force a second update.
- name: Clear the just-cloned marker
ansible.builtin.set_fact:
__pve_vm_created: false
- name: Resize boot drive
no_log: true # defence in depth: the module already masks the API token secret
delegate_to: "{{ pve_vm_delegate }}"
community.proxmox.proxmox_disk:
vmid: "{{ pve_vm_vmid }}"
disk: "{{ pve_vm_boot_disk }}"
size: "{{ pve_vm_disk_size }}"
state: resized
when:
- pve_vm_manage_disk | bool
- __pve_vm_resize_disk
- not ansible_check_mode
register: __pve_vm_disk_resize
- name: Track disk resize result
ansible.builtin.set_fact:
__pve_vm_disk_resized: "{{ __pve_vm_disk_resize.changed | default(false) }}"
- name: Restart VM if disk was resized
no_log: true # defence in depth: the module already masks the API token secret
delegate_to: "{{ pve_vm_delegate }}"
community.proxmox.proxmox_kvm:
node: "{{ pve_vm_node }}"
vmid: "{{ pve_vm_vmid }}"
state: restarted
when:
- __pve_vm_disk_resized
- pve_vm_reboot_if_required | bool
- not ansible_check_mode
+28
View File
@@ -0,0 +1,28 @@
---
# The input rules the argument spec cannot express. main.yml imports this file under
# tags: always, before any change; each assert keeps the condition under which its input is read.
# Every run calls the API: even pve_vm_state absent without pve_vm_allow_destroy looks the VM up.
- name: Assert the Proxmox API credentials are set
ansible.builtin.assert:
that:
- pve_vm_api_user | length > 0
- pve_vm_api_token_secret is defined and pve_vm_api_token_secret | length > 0
fail_msg: >-
The Proxmox API calls need pve_vm_api_user (bare user name, the role appends
@<pve_vm_api_realm>) and pve_vm_api_token_secret (normally vaulted). Neither has a usable
default: set them in the inventory.
quiet: true
# The update reads the resize flag, which is only computed while pve_vm_disk_size is defined.
- name: Assert the boot disk size is set while the disk is managed
ansible.builtin.assert:
that:
- pve_vm_disk_size is defined
fail_msg: >-
pve_vm_disk_size (for example 32G) must be set while pve_vm_manage_disk is true, the default.
Set pve_vm_manage_disk to false to leave the boot disk alone.
quiet: true
when:
- pve_vm_manage_disk | bool
- pve_vm_state != "absent"
+16
View File
@@ -0,0 +1,16 @@
---
- name: Wait for SSH to become available
delegate_to: localhost
ansible.builtin.wait_for:
host: "{{ ansible_host }}"
port: 22
timeout: 3600
# Runs on the guest itself, over the connection the play uses for it.
- name: Wait for cloud-init to finish
ansible.builtin.command: cloud-init status --wait
register: __pve_vm_cloudinit_status
retries: 10
delay: 15
until: __pve_vm_cloudinit_status.rc == 0
changed_when: false
+4
View File
@@ -0,0 +1,4 @@
---
# Authorization header of the ansible.builtin.uri call in detect_disk.yml, derived from the
# pve_vm_api_* inputs.
__pve_vm_api_auth_header: "PVEAPIToken={{ pve_vm_api_user }}@{{ pve_vm_api_realm }}!{{ pve_vm_api_token_id }}={{ pve_vm_api_token_secret }}"
+1 -1
View File
@@ -3,7 +3,7 @@
# (MOLECULE_IMAGE) and molecule-ubuntu2604 (MOLECULE_IMAGE_2604) images, pinned in
# .gitea/workflows/molecule.yml. No privileged mode: systemd needs a writable cgroup and the
# firewall tools need NET_ADMIN, nothing else. Needs the network:
# prepare purges any ufw and refreshes the APT cache the image deletes.
# prepare purges the ufw the image ships and refreshes the APT cache the image deletes.
driver:
name: docker
platforms:
+2 -2
View File
@@ -1,6 +1,6 @@
---
# The purge keeps the scenario independent of what the image ships. The image keeps no APT lists,
# and the check step needs them, or the install task cannot even preview the package.
# The image ships ufw and no APT lists; the check step needs ufw gone and the lists back, or the
# install task cannot even preview the package.
- name: Prepare a host without ufw
hosts: all
gather_facts: false
+1 -3
View File
@@ -7,12 +7,10 @@
hosts: all
gather_facts: false
tasks:
# The image keeps no APT lists, so the install refreshes them.
- name: Install ufw
ansible.builtin.apt:
ansible.builtin.package:
name: ufw
state: present
update_cache: true
# An application profile whose name holds openssh, for the orphan seeds below.
- name: Define an application profile named like SSH
+9 -13
View File
@@ -6,12 +6,11 @@
When <head-ref> starts with `renovate/`, the diff of <base-ref>...HEAD may only touch:
* requirements-dev.txt and requirements-molecule.txt: pinned `name==version` lines, the same
packages before and after;
* requirements-dev.lock and requirements-molecule.lock (pip-compile --generate-hashes output):
`name==version` entries, `--hash=sha256:<64 hex>` lines and plain `# via` or prose comments,
nothing else; packages may be added or removed (a transitive dependency), but the
`# pip-compile ...` command in the header, which Renovate runs again, must stay as it is;
* requirements-dev.txt: pinned `name==version` lines, the same packages before and after;
* requirements-dev.lock (pip-compile --generate-hashes output): `name==version` entries,
`--hash=sha256:<64 hex>` lines and plain `# via` or prose comments, nothing else; packages may
be added or removed (a transitive dependency), but the `# pip-compile ...` command in the
header, which Renovate runs again, must stay as it is;
* requirements.yml and extensions/molecule/requirements.yml: `version:` lines (the collection
names, and every other line, stay);
* .pre-commit-config.yaml: `rev:` lines (a tag, or a commit SHA with its `# frozen: <tag>` comment);
@@ -70,9 +69,6 @@ UBUNTU_LINE = re.compile(
)
DOCKERFILE = re.compile(r"images/[^/]+/Dockerfile")
COLLECTION_PINS = {"requirements.yml", "extensions/molecule/requirements.yml"}
# Lint's and the molecule-controller image's requirements, each with its pip-compile lock.
REQUIREMENTS = {"requirements-dev.txt", "requirements-molecule.txt"}
LOCKS = {"requirements-dev.lock", "requirements-molecule.lock"}
CONSUMERS = {
".gitea/workflows/lint.yml",
".gitea/workflows/build.yml",
@@ -112,7 +108,7 @@ def reduce_version(line):
return "version" if VERSION_LINE.match(line) else None
# A lock: an entry (with an optional environment marker), a hash, or a comment.
# requirements-dev.lock: an entry (with an optional environment marker), a hash, or a comment.
# The marker and the prose comment use a small character set: no backslash, quote of a shell, `$` or `--`.
LOCK_ENTRY = re.compile(
r"^[A-Za-z0-9][A-Za-z0-9._-]*==[0-9][0-9A-Za-z.+!_-]*"
@@ -126,7 +122,7 @@ LOCK_COMMENT = re.compile(
def lock_problem(removed, added):
"""None when every changed line of a lock is an entry, a hash or a plain comment and
"""None when every changed line of requirements-dev.lock is an entry, a hash or a plain comment and
the `# pip-compile ...` command line is the same on both sides."""
for line in removed + added:
if LOCK_COMMAND.match(line):
@@ -169,14 +165,14 @@ def reduce_pin(line):
def file_problem(path, removed, added):
"""One-line reason why the change to `path` is not allowed for a bot, or None."""
if path in REQUIREMENTS:
if path == "requirements-dev.txt":
return same_shape(
removed,
added,
reduce_requirement,
"a pinned `name==version` line of the same package",
)
if path in LOCKS:
if path == "requirements-dev.lock":
return lock_problem(removed, added)
if path in COLLECTION_PINS:
return same_shape(removed, added, reduce_version, "a `version:` line")
+17 -42
View File
@@ -386,10 +386,6 @@ def check_pins(matrix, consumer_texts):
PYTHON_PIN_FILE = ".python-version"
LOCK_FILE = "requirements-dev.lock"
# The molecule-controller image's lock (ADR 0003).
MOLECULE_LOCK_FILE = "requirements-molecule.lock"
LOCK_FILES = (LOCK_FILE, MOLECULE_LOCK_FILE)
ANSIBLE_CORE_RE = re.compile(r"^ansible-core==([^\s;\\]+)", re.MULTILINE)
PYTHON_PIN_RE = re.compile(r"[0-9]+\.[0-9]+")
LOCK_PYTHON_RE = re.compile(
r"^# This file is autogenerated by pip-compile with Python ([0-9]+\.[0-9]+)\s*$",
@@ -401,27 +397,25 @@ ARG_PYTHON_RE = re.compile(
)
def check_python_pin(pin_text, locks, dockerfiles):
"""Errors where the Python of .python-version, the header of each lock (path -> text) and the
def check_python_pin(pin_text, lock_text, dockerfiles):
"""Errors where the Python of .python-version, the header of requirements-dev.lock and the
`ARG PYTHON_VERSION=` of an image Dockerfile (path -> text) are not one MAJOR.MINOR version. A
clone's virtualenv (scripts/dev-setup.sh) and the images' /opt/venv use the first, a lock
records it as the interpreter it was resolved on; at least one Dockerfile must carry the ARG."""
clone's virtualenv (scripts/dev-setup.sh) and the ci image's /opt/venv use the first, the lock
records the third as the interpreter it was resolved on; at least one Dockerfile must carry the ARG."""
pin = pin_text.strip()
if not PYTHON_PIN_RE.fullmatch(pin):
return [f"{PYTHON_PIN_FILE} must hold one MAJOR.MINOR version, found {pin!r}"]
errors = []
for path, lock_text in locks.items():
header = LOCK_PYTHON_RE.search(lock_text)
if not header:
errors.append(
f"{path}: no 'autogenerated by pip-compile with Python X.Y' header"
)
elif header.group(1) != pin:
requirements = path.removesuffix(".lock") + ".txt"
errors.append(
f"{path}: header says Python {header.group(1)} but {PYTHON_PIN_FILE} is {pin}; "
f"regenerate it with scripts/lock-requirements.sh {requirements}"
)
header = LOCK_PYTHON_RE.search(lock_text)
if not header:
errors.append(
f"{LOCK_FILE}: no 'autogenerated by pip-compile with Python X.Y' header"
)
elif header.group(1) != pin:
errors.append(
f"{LOCK_FILE}: header says Python {header.group(1)} but {PYTHON_PIN_FILE} is {pin}; "
"regenerate it with scripts/lock-requirements.sh"
)
carriers = 0
for path, text in dockerfiles.items():
for arg in ARG_PYTHON_RE.findall(text):
@@ -437,25 +431,6 @@ def check_python_pin(pin_text, locks, dockerfiles):
return errors
def check_ansible_core_pins(locks):
"""Errors where the locks (path -> text) do not pin one ansible-core version: Lint runs the one of
requirements-dev.lock and Molecule the one of requirements-molecule.lock, and both judge the same code."""
errors, versions = [], {}
for path, text in locks.items():
m = ANSIBLE_CORE_RE.search(text)
if m:
versions[path] = m[1]
else:
errors.append(f"{path}: no ansible-core== entry")
if len(set(versions.values())) > 1:
pins = ", ".join(f"{path} {version}" for path, version in versions.items())
errors.append(
f"the locks pin different ansible-core versions ({pins}); Lint and Molecule must run one "
"ansible-core, so move both pins in the same pull request"
)
return errors
JOB_IMAGE_RE = re.compile(r"ubuntu:(?P<release>[0-9]+\.[0-9]+)@sha256:[0-9a-f]{64}")
CONTAINER_LINE_RE = re.compile(
r"^\s*container:[ \t]*\n\s*image:\s*\$\{\{\s*matrix\.job_image\s*\}\}[ \t]*$",
@@ -696,11 +671,11 @@ def run(argv):
if pathlib.Path(path).exists():
dockerfiles[path] = pathlib.Path(path).read_text()
try:
locks = {lock: pathlib.Path(lock).read_text() for lock in LOCK_FILES}
errors += check_python_pin(
pathlib.Path(PYTHON_PIN_FILE).read_text(), locks, dockerfiles
pathlib.Path(PYTHON_PIN_FILE).read_text(),
pathlib.Path(LOCK_FILE).read_text(),
dockerfiles,
)
errors += check_ansible_core_pins(locks)
except OSError as exc:
errors.append(f"cannot read the Python pin files: {exc}")
workflows = (
+10 -18
View File
@@ -2,17 +2,16 @@
# SPDX-FileCopyrightText: Defame1297 and contributors
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Regenerate the hashed lock of a root requirements file: requirements-dev.txt (Lint and Build, the
# default) or requirements-molecule.txt (the molecule-controller image) into the .lock of the same name.
# Regenerate requirements-dev.lock, the hashed lock of requirements-dev.txt (#113).
#
# scripts/lock-requirements.sh [FILE] re-resolve, keeping every locked version that still fits
# scripts/lock-requirements.sh --upgrade [FILE] move every package, transitive ones included, to its newest release
# scripts/lock-requirements.sh re-resolve, keeping every locked version that still fits
# scripts/lock-requirements.sh --upgrade move every package, transitive ones included, to its newest release
#
# Needs the network (PyPI) and the Python of .python-version (python<MINOR>; KAMINO_PYTHON overrides it): the
# header of the lock records it, and check_image_versions.py pins fails when it differs.
# pip and pip-tools are installed, at the pinned versions below, into a throwaway virtualenv, never
# into the project's .venv. pip is pinned too: pip-tools breaks on newer pip releases (7.5.2 on pip 26). Commit
# the lock with its requirements file; pip refuses an install of the two when they disagree
# the lock with requirements-dev.txt; pip refuses an install of the two when they disagree
# (`pip install --require-hashes -r requirements-dev.lock -r requirements-dev.txt`).
# The pins are not hash-checked themselves: they come from PyPI over TLS, like the pip that
# created the throwaway venv.
@@ -26,19 +25,12 @@ set -euo pipefail
pip_version="25.2"
pip_tools_version="7.6.2"
usage="usage: lock-requirements.sh [--upgrade] [requirements-dev.txt|requirements-molecule.txt]"
upgrade=()
if [ "${1:-}" = "--upgrade" ]; then
upgrade=(--upgrade)
shift
fi
requirements="${1:-requirements-dev.txt}"
case "$requirements" in
requirements-dev.txt|requirements-molecule.txt) ;;
*) echo "$usage" >&2; exit 2 ;;
case "${1:-}" in
"") ;;
--upgrade) upgrade=(--upgrade) ;;
*) echo "usage: lock-requirements.sh [--upgrade]" >&2; exit 2 ;;
esac
[ "$#" -le 1 ] || { echo "$usage" >&2; exit 2; }
lock="${requirements%.txt}.lock"
root="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")/.." && pwd)"
[ -f "$root/.python-version" ] || { echo "error: .python-version is missing (the Python of the lock, a clone and the ci image)" >&2; exit 1; }
@@ -62,5 +54,5 @@ cd "$root"
# --allow-unsafe: setuptools is a dependency of a tool here, and pip refuses an unpinned
# requirement in a file that carries hashes.
"$tmp/venv/bin/pip-compile" --quiet --generate-hashes --strip-extras --allow-unsafe \
"${upgrade[@]}" --output-file "$lock" "$requirements"
echo "$lock regenerated; commit it with $requirements."
"${upgrade[@]}" --output-file requirements-dev.lock requirements-dev.txt
echo "requirements-dev.lock regenerated; commit it with requirements-dev.txt."
+1 -7
View File
@@ -135,13 +135,7 @@ class Registry:
def tags(self):
tags, path = [], "tags/list"
while path:
try:
body, headers = self._get(path)
except RegistryError as exc:
# A repository not pushed yet is 404 NAME_UNKNOWN (OCI distribution spec): no tags.
if exc.status == 404 and not tags:
return []
raise
body, headers = self._get(path)
tags += body.get("tags") or []
link = re.search(r"<[^>]*/tags/list(\?[^>]*)>", headers.get("Link", ""))
path = f"tags/list{link[1]}" if link else None
+1
View File
@@ -116,6 +116,7 @@ declare -A last_seconds=(
[roles/user_management/molecule/default]=115
[roles/pihole/molecule/default]=112
[roles/sshd/molecule/default]=65
[roles/pve_vm/molecule/default]=60
[roles/pve_lxc/molecule/default]=44
[roles/_binary_update/molecule/check_mode]=42
[roles/network_interfaces/molecule/default]=36
-21
View File
@@ -68,27 +68,6 @@ class LockRuleTest(unittest.TestCase):
]
self.assertIsNone(cbd.file_problem("requirements-dev.lock", removed, added))
def test_the_controller_lock_follows_the_lock_rule(self):
removed = ["molecule==26.11.0 \\", f" --hash=sha256:{H1}"]
added = ["molecule==26.12.0 \\", f" --hash=sha256:{H2}"]
self.assertIsNone(
cbd.file_problem("requirements-molecule.lock", removed, added)
)
self.assertIsNotNone(
cbd.file_problem(
"requirements-molecule.lock", [], ["--index-url https://evil/simple"]
)
)
def test_the_controller_requirements_follow_the_pin_rule(self):
path = "requirements-molecule.txt"
self.assertIsNone(
cbd.file_problem(path, ["molecule==26.11.0"], ["molecule==26.12.0"])
)
self.assertIsNotNone(
cbd.file_problem(path, ["molecule==26.11.0"], ["evil==1.0"])
)
def test_the_header_command_may_not_change(self):
old = "# pip-compile --generate-hashes --output-file=requirements-dev.lock requirements-dev.txt"
new = old.replace("--generate-hashes", "--index-url=https://evil/simple")
+7 -91
View File
@@ -517,20 +517,6 @@ class PureTest(unittest.TestCase):
files = civ.inputs_of(entry, (root / entry["dockerfile"]).read_text())[1]
self.assertIn("extensions/molecule/requirements.yml", files)
def test_the_controller_pins_are_inputs_of_the_controller_image(self):
root = pathlib.Path(__file__).resolve().parents[2]
entry = civ.matrix_of((root / civ.MATRIX_FILE).read_text())[
"molecule-controller"
]
files = civ.inputs_of(entry, (root / entry["dockerfile"]).read_text())[1]
for pin in (
"requirements-molecule.txt",
"requirements-molecule.lock",
"requirements.yml",
"extensions/molecule/requirements.yml",
):
self.assertIn(pin, files)
def test_real_dockerfiles_carry_the_metadata(self):
root = pathlib.Path(__file__).resolve().parents[2]
matrix = civ.matrix_of((root / civ.MATRIX_FILE).read_text())
@@ -556,7 +542,7 @@ class PythonPinTest(unittest.TestCase):
def check(self, pin="3.13\n", lock=None, dockerfiles=None):
return civ.check_python_pin(
pin,
{"requirements-dev.lock": self.LOCK if lock is None else lock},
self.LOCK if lock is None else lock,
{"images/ci/Dockerfile": self.DOCKERFILE}
if dockerfiles is None
else dockerfiles,
@@ -577,19 +563,6 @@ class PythonPinTest(unittest.TestCase):
self.assertIn("header says Python 3.14", errors[0])
self.assertIn("lock-requirements.sh", errors[0])
def test_every_lock_header_must_match(self):
errors = civ.check_python_pin(
"3.13\n",
{
"requirements-dev.lock": self.LOCK,
"requirements-molecule.lock": self.LOCK.replace("3.13", "3.14"),
},
{"images/ci/Dockerfile": self.DOCKERFILE},
)
self.assertEqual(len(errors), 1)
self.assertTrue(errors[0].startswith("requirements-molecule.lock: header says"))
self.assertIn("lock-requirements.sh requirements-molecule.txt", errors[0])
def test_lock_without_header_is_an_error(self):
errors = self.check(lock="six==1.0 \\\n")
self.assertEqual(len(errors), 1)
@@ -641,14 +614,8 @@ class PythonPinTest(unittest.TestCase):
self.assertEqual(
civ.check_python_pin(
(root / ".python-version").read_text(),
{lock: (root / lock).read_text() for lock in civ.LOCK_FILES},
{
path: (root / path).read_text()
for path in (
"images/ci/Dockerfile",
"images/molecule-controller/Dockerfile",
)
},
(root / "requirements-dev.lock").read_text(),
{"images/ci/Dockerfile": (root / "images/ci/Dockerfile").read_text()},
),
[],
)
@@ -658,43 +625,6 @@ class PythonPinTest(unittest.TestCase):
self.assertEqual(len(errors), 1)
class AnsibleCorePinTest(unittest.TestCase):
DEV = "ansible-core==2.22.0 \\\n --hash=sha256:" + "a" * 64 + "\n"
MOL = "#\nansible-core==2.22.0 \\\n # via -r requirements-molecule.txt\n"
def check(self, dev=None, mol=None):
return civ.check_ansible_core_pins(
{
"requirements-dev.lock": self.DEV if dev is None else dev,
"requirements-molecule.lock": self.MOL if mol is None else mol,
}
)
def test_equal_pins_pass(self):
self.assertEqual(self.check(), [])
def test_differing_pins_fail(self):
errors = self.check(mol=self.MOL.replace("2.22.0", "2.21.3"))
self.assertEqual(len(errors), 1)
self.assertIn("2.22.0", errors[0])
self.assertIn("2.21.3", errors[0])
self.assertIn("requirements-molecule.lock", errors[0])
def test_a_lock_without_ansible_core_fails(self):
errors = self.check(dev="reuse==6.3.0 \\\n")
self.assertEqual(len(errors), 1)
self.assertIn("requirements-dev.lock: no ansible-core==", errors[0])
def test_the_committed_locks_agree(self):
root = pathlib.Path(__file__).resolve().parents[2]
self.assertEqual(
civ.check_ansible_core_pins(
{lock: (root / lock).read_text() for lock in civ.LOCK_FILES}
),
[],
)
class GitTest(unittest.TestCase):
"""Run the script as CI does, in a throwaway repository."""
@@ -713,12 +643,10 @@ class GitTest(unittest.TestCase):
),
)
self.write(".python-version", "3.13\n")
for lock in civ.LOCK_FILES:
self.write(
lock,
"# This file is autogenerated by pip-compile with Python 3.13\n"
"ansible-core==2.22.0 \\\n",
)
self.write(
"requirements-dev.lock",
"# This file is autogenerated by pip-compile with Python 3.13\n",
)
self.write("images/mol/Dockerfile", labelled("mol"))
self.write("docs/images/ci.md", "ci\n")
self.write("docs/images/mol.md", "mol\n")
@@ -764,18 +692,6 @@ class GitTest(unittest.TestCase):
self.assertEqual(code, 1)
self.assertIn("other.yaml: mentions git.rkdr.net/defame1297/", err)
def test_pins_cli_fails_when_the_locks_pin_different_ansible_core(self):
self.write(".gitea/workflows/lint.yml", "name: Lint\n")
self.assertEqual(self.script("pins")[0], 0)
self.write(
"requirements-molecule.lock",
"# This file is autogenerated by pip-compile with Python 3.13\n"
"ansible-core==2.21.3 \\\n",
)
self.assert_clean_failure(
self.script("pins"), "the locks pin different ansible-core versions"
)
def test_bump_mode_is_gone(self):
self.write(".gitea/workflows/lint.yml", "name: Lint\n")
self.assertEqual(self.script("bump", "main")[0], 2)
-87
View File
@@ -1,87 +0,0 @@
# SPDX-FileCopyrightText: Defame1297 and contributors
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for scripts/lock-requirements.sh with a stub interpreter in place of PyPI and pip-tools.
Run with: python3 -m unittest discover -s tests/scripts
"""
import os
import pathlib
import shutil
import subprocess
import tempfile
import unittest
REPO = pathlib.Path(__file__).resolve().parents[2]
SCRIPT = REPO / "scripts" / "lock-requirements.sh"
# `-c` (the version check) passes; `-m venv <dir>` makes a venv whose pip does nothing and whose
# pip-compile records its arguments.
PYTHON_STUB = """#!/usr/bin/env bash
[ "$1" = "-c" ] && exit 0
[ "$1 $2" = "-m venv" ] || exit 1
mkdir -p "$3/bin"
printf '#!/bin/sh\\nexit 0\\n' > "$3/bin/pip"
printf '#!/bin/sh\\necho "$*" >> "$STUB_LOG"\\n' > "$3/bin/pip-compile"
chmod +x "$3/bin/pip" "$3/bin/pip-compile"
"""
@unittest.skipUnless(shutil.which("bash"), "bash is required")
class LockRequirementsTest(unittest.TestCase):
def setUp(self):
self.tmp = pathlib.Path(tempfile.mkdtemp(prefix="kamino-lock-")).resolve()
self.addCleanup(shutil.rmtree, self.tmp, True)
(self.tmp / "scripts").mkdir()
shutil.copy(SCRIPT, self.tmp / "scripts")
(self.tmp / ".python-version").write_text("3.14\n")
for name in ("requirements-dev.txt", "requirements-molecule.txt"):
(self.tmp / name).write_text("a==1\n")
python = self.tmp / "python"
python.write_text(PYTHON_STUB)
python.chmod(0o755)
self.log = self.tmp / "log"
def lock(self, *args):
proc = subprocess.run(
["bash", str(self.tmp / "scripts" / "lock-requirements.sh"), *args],
capture_output=True,
text=True,
check=False,
env={
**os.environ,
"KAMINO_PYTHON": str(self.tmp / "python"),
"STUB_LOG": str(self.log),
},
)
compiled = self.log.read_text() if self.log.exists() else ""
return proc.returncode, compiled, proc.stderr
def test_the_default_locks_the_dev_requirements(self):
code, compiled, err = self.lock()
self.assertEqual(code, 0, err)
self.assertIn(
"--output-file requirements-dev.lock requirements-dev.txt", compiled
)
self.assertNotIn("--upgrade", compiled)
def test_a_requirements_file_is_locked_next_to_itself(self):
code, compiled, err = self.lock("--upgrade", "requirements-molecule.txt")
self.assertEqual(code, 0, err)
self.assertIn(
"--upgrade --output-file requirements-molecule.lock requirements-molecule.txt",
compiled,
)
def test_a_file_that_is_not_a_root_requirements_file_is_refused(self):
for bad in ("requirements-none.txt", "setup.cfg", "../requirements-dev.txt"):
with self.subTest(bad=bad):
code, compiled, _err = self.lock(bad)
self.assertNotEqual(code, 0)
self.assertEqual(compiled, "")
def test_an_unknown_option_is_a_usage_error(self):
code, compiled, err = self.lock("--frobnicate")
self.assertEqual(code, 2)
self.assertIn("usage:", err)
self.assertEqual(compiled, "")
+1 -18
View File
@@ -104,7 +104,6 @@ class FakeRegistry(http.server.BaseHTTPRequestHandler):
refuse_token = False
no_realm = False
empty_token = False
unknown = False # the repository does not exist yet
agents = None # a fresh list per test, set in setUp
def do_GET(self):
@@ -128,9 +127,6 @@ class FakeRegistry(http.server.BaseHTTPRequestHandler):
b"{}",
extra={"WWW-Authenticate": f'Bearer realm="{realm}",service="reg"'},
)
elif self.unknown:
body = {"errors": [{"code": "NAME_UNKNOWN", "message": "unknown"}]}
self.reply(404, json.dumps(body).encode())
else:
self.reply(200, json.dumps({"tags": ["0.1.0"]}).encode())
@@ -154,7 +150,7 @@ class QuietServer(http.server.HTTPServer):
class RegistryClient(unittest.TestCase):
def setUp(self):
FakeRegistry.refuse = FakeRegistry.refuse_token = FakeRegistry.no_realm = False
FakeRegistry.empty_token = FakeRegistry.unknown = False
FakeRegistry.empty_token = False
FakeRegistry.agents = []
server = QuietServer(("127.0.0.1", 0), FakeRegistry)
threading.Thread(target=server.serve_forever, daemon=True).start()
@@ -169,19 +165,6 @@ class RegistryClient(unittest.TestCase):
for agent in FakeRegistry.agents:
self.assertTrue(agent.startswith("kamino-"), agent)
def test_a_repository_not_yet_pushed_has_no_tags(self):
FakeRegistry.unknown = True
self.assertEqual(self.registry.tags(), [])
self.assertEqual(
niv.next_version("0.1", self.registry.tags(), "c", no_label), "0.1.0"
)
def test_a_missing_manifest_is_still_a_registry_error(self):
FakeRegistry.unknown = True
with self.assertRaises(niv.RegistryError) as caught:
self.registry.label("0.1.0")
self.assertIn("404", str(caught.exception))
def test_a_refused_request_names_its_status_and_body(self):
FakeRegistry.refuse = True
with self.assertRaises(niv.RegistryError) as caught: