From bb0bf789647cbf7c068e51bec6e049f7d5211afb Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Wed, 25 Nov 2026 22:14:02 +0000 Subject: [PATCH] build(deps): add community.proxmox and proxmoxer for pve_lxc The pve_lxc role (#386) manages Proxmox VE guests through community.proxmox, whose modules import proxmoxer on the controller. - galaxy.yml: depend on community.proxmox >=2.1.0 (the X.Y.0 of the tested pin, like the other dependencies); requirements.yml pins 2.1.0. - requirements-dev.txt/.lock: pin proxmoxer 2.3.0, the floor community.proxmox 2.1.0 enforces, so the dev venv and the ci image carry it. - README: name the new dependency and the controller-side proxmoxer floor. - ci image: label and doc list the new contents; the changed pin files rebuild it on main. Refs #386 Assisted-by: Claude Code:claude-opus-5-5 --- README.md | 6 ++++-- changelogs/fragments/386-community-proxmox-dependency.yml | 5 +++++ docs/images/ci.md | 5 +++-- galaxy.yml | 5 ++++- images/ci/Dockerfile | 6 +++--- requirements-dev.lock | 4 ++++ requirements-dev.txt | 3 +++ requirements.yml | 2 ++ 8 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 changelogs/fragments/386-community-proxmox-dependency.yml diff --git a/README.md b/README.md index 86d4ef5..bb16bb5 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,10 @@ collections: version: v2.1.0 ``` -Its dependencies (`community.general`, `ansible.posix`) are declared in `galaxy.yml`, so -`ansible-galaxy` installs them unless the same file already pins a satisfying version. +Its dependencies (`community.general`, `ansible.posix`, `community.proxmox`) are declared in `galaxy.yml`, so +`ansible-galaxy` installs them unless the same file already pins a satisfying version. The modules of +`community.proxmox` also need the Python library `proxmoxer` 2.3 or later on the controller +(`pip install 'proxmoxer>=2.3'`); `galaxy.yml` cannot declare a Python dependency. ```yaml - ansible.builtin.include_role: diff --git a/changelogs/fragments/386-community-proxmox-dependency.yml b/changelogs/fragments/386-community-proxmox-dependency.yml new file mode 100644 index 0000000..aa38651 --- /dev/null +++ b/changelogs/fragments/386-community-proxmox-dependency.yml @@ -0,0 +1,5 @@ +--- +minor_changes: + - >- + galaxy.yml - Declare ``community.proxmox`` (>=2.1.0) as a dependency, needed by ``pve_lxc``. + Its modules need the Python library ``proxmoxer`` 2.3 or later on the controller. diff --git a/docs/images/ci.md b/docs/images/ci.md index 968fd8a..5e15584 100644 --- a/docs/images/ci.md +++ b/docs/images/ci.md @@ -9,9 +9,10 @@ Ubuntu 26.04 with: - **Python tools** in `/opt/venv` (on `PATH`; it runs on Python 3.14, the version of `.python-version`, from the baked copy and not from the distribution's `python3`), from `requirements-dev.lock` (the hashed lock of `requirements-dev.txt`, installed with `pip install --require-hashes`): `ansible-core`, `ansible-lint`, `pre-commit`, `antsibull-changelog`, `galaxy-importer`, `reuse`, `molecule` and - `molecule-plugins[docker]` (the Docker driver, with the `docker` Python SDK). + `molecule-plugins[docker]` (the Docker driver, with the `docker` Python SDK), and `proxmoxer`, the controller-side + library the modules of `community.proxmox` import. - **The collections the roles call** in `/opt/collections` (`ANSIBLE_COLLECTIONS_PATH` is set to it), from - `requirements.yml`: `community.general` and `ansible.posix` at the exact versions CI tests against, so + `requirements.yml`: `community.general`, `ansible.posix` and `community.proxmox` at the exact versions CI tests against, so `ansible-lint --offline` resolves their modules instead of mocking them; and from `extensions/molecule/requirements.yml`, `community.docker`, which the Molecule Docker driver's own playbooks call. - **Every pre-commit hook environment** of `.pre-commit-config.yaml` in `/opt/pre-commit` diff --git a/galaxy.yml b/galaxy.yml index 238b60a..82acc5d 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -22,10 +22,13 @@ 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 system_baseline and user_management. +# ansible.posix by system_baseline and user_management, community.proxmox by pve_lxc (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: community.general: ">=14.0.0" ansible.posix: ">=2.2.0" + community.proxmox: ">=2.1.0" build_ignore: # Repository tooling that is not part of the Collection. scripts/check_tarball.py fails # the build if anything outside its allowlist ends up in the archive, so a new top-level diff --git a/images/ci/Dockerfile b/images/ci/Dockerfile index bf67b70..65a116c 100644 --- a/images/ci/Dockerfile +++ b/images/ci/Dockerfile @@ -12,7 +12,7 @@ # - OS packages: git, shellcheck (actionlint runs it over run: blocks), the # distribution's python3 and ca-certificates. # - /opt/venv: requirements-dev.lock, the hashed lock of requirements-dev.txt (ansible-core, ansible-lint, pre-commit, -# antsibull-changelog, galaxy-importer, reuse, molecule and its Docker driver), on the Python of +# antsibull-changelog, galaxy-importer, reuse, molecule and its Docker driver, proxmoxer), on the Python of # .python-version (PYTHON_VERSION below), the one the lock was resolved on and a clone's .venv uses. # - /opt/collections: the collections of requirements.yml (the versions the roles are # tested against), found through ANSIBLE_COLLECTIONS_PATH, so `ansible-lint --offline` @@ -177,7 +177,7 @@ FROM os AS final ARG PYTHON_VERSION=3.14 LABEL org.opencontainers.image.title="ci" \ - org.opencontainers.image.description="CI tooling image for the mortis.kamino Ansible Collection: the Lint, Build and Molecule workflows run in it, so a job only checks out the code and runs. It bakes in ansible-core, ansible-lint, pre-commit with every hook environment of the repository, antsibull-changelog, galaxy-importer, reuse, molecule with its Docker driver, the collections of requirements.yml and extensions/molecule/requirements.yml, git, shellcheck, Python 3.11, 3.13 and the version of .python-version (the tools in /opt/venv run on it) next to the distribution python3 and primed ansible-test sanity virtualenvs. Pin it by tag and digest, as a job container or with docker run; it has no Node, so clone with git." \ + org.opencontainers.image.description="CI tooling image for the mortis.kamino Ansible Collection: the Lint, Build and Molecule workflows run in it, so a job only checks out the code and runs. It bakes in ansible-core, ansible-lint, pre-commit with every hook environment of the repository, antsibull-changelog, galaxy-importer, reuse, molecule with its Docker driver, proxmoxer, the collections of requirements.yml and extensions/molecule/requirements.yml, git, shellcheck, Python 3.11, 3.13 and the version of .python-version (the tools in /opt/venv run on it) next to the distribution python3 and primed ansible-test sanity virtualenvs. Pin it by tag and digest, as a job container or with docker run; it has no Node, so clone with git." \ 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/ci.md" \ @@ -185,7 +185,7 @@ LABEL org.opencontainers.image.title="ci" \ org.opencontainers.image.authors="Defame1297 and contributors" \ org.opencontainers.image.base.name="ubuntu:26.04" \ net.rkdr.mortis.purpose="CI tooling image for the mortis.kamino Ansible Collection: the Lint, Build and Molecule workflows run in it, so a job only checks out the code and runs." \ - net.rkdr.mortis.contents="Ubuntu 26.04, /opt/venv (ansible-core, ansible-lint, pre-commit, antsibull-changelog, galaxy-importer, reuse, molecule, molecule-plugins[docker]), /opt/collections (community.general, ansible.posix, community.docker), /opt/pre-commit hook environments, ansible-test sanity venvs, python3 (distribution), python3.11, python3.13, python (the one of /opt/venv), git, shellcheck, /opt/ci-pins.sha256" \ + net.rkdr.mortis.contents="Ubuntu 26.04, /opt/venv (ansible-core, ansible-lint, pre-commit, antsibull-changelog, galaxy-importer, reuse, molecule, molecule-plugins[docker], proxmoxer), /opt/collections (community.general, ansible.posix, community.proxmox, community.docker), /opt/pre-commit hook environments, ansible-test sanity venvs, python3 (distribution), python3.11, python3.13, python (the one of /opt/venv), git, shellcheck, /opt/ci-pins.sha256" \ net.rkdr.mortis.usage="Lint and Build: job container on the kamino-docker runner, git.rkdr.net/mortis/ci:version@sha256:digest with PRE_COMMIT_HOME set to /opt/pre-commit. Molecule (host executor, kamino-molecule runner): docker run as the runner user, with the Docker socket and the checkout mounted at the same path. In both, run sha256sum -c /opt/ci-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 \ diff --git a/requirements-dev.lock b/requirements-dev.lock index a865286..e4aa9a8 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -1619,6 +1619,10 @@ propcache==0.5.4 \ # via # aiohttp # yarl +proxmoxer==2.3.0 \ + --hash=sha256:0b0b2067187af1fc6d4257a46ac68c8fd79cc25d2813637cdae7a9a98fbfd11f \ + --hash=sha256:1c03445e95cf9c53b6e50614dbaf561e0e1eb3ec878cf45ddde4bc4421c56743 + # via -r requirements-dev.txt puremagic==2.3.0 \ --hash=sha256:15ce035fe4c3f23e884a105d07448a5a81dd2e297985bdb636928ddf89bb3fe7 \ --hash=sha256:b54e4a69dd37c50bacc879380f132382ab4e9a935529628c8975abcc73e10640 diff --git a/requirements-dev.txt b/requirements-dev.txt index 6882701..c1c4e1d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -14,6 +14,9 @@ galaxy-importer==0.4.44 reuse==6.3.0 molecule==26.11.0 molecule-plugins[docker]==26.11.0 +# proxmoxer: the controller-side library community.proxmox's modules import (they refuse anything below 2.3), +# so lint and Molecule run where a consumer's controller would. +proxmoxer==2.3.0 # apm-cli: for changing apm.yml (run apm install, commit the lock). Keep it at 0.36.1 or later (#252): # before 0.29.0, `apm audit --ci` compares the whole .claude/settings.json and fails on any hand-written key. apm-cli==0.37.0 diff --git a/requirements.yml b/requirements.yml index 8641753..d32c390 100644 --- a/requirements.yml +++ b/requirements.yml @@ -11,3 +11,5 @@ collections: version: 14.0.1 - name: ansible.posix version: 2.2.2 + - name: community.proxmox + version: 2.1.0