From dc7d3bdfd9628457b6ec7f7d98eba0f9becd3fee Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 25 Nov 2026 22:22:48 +0000 Subject: [PATCH 1/5] chore(deps): update git.rkdr.net/mortis/ci docker tag to v0.2.44 --- .gitea/workflows/build.yml | 2 +- .gitea/workflows/gitea-release-key.yml | 2 +- .gitea/workflows/lint.yml | 2 +- .gitea/workflows/molecule.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 8f84274..3b1cc31 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -28,7 +28,7 @@ jobs: timeout-minutes: 30 # The ci image (images/ci, built by image.yml): tag for the release, digest enforced. container: - image: git.rkdr.net/mortis/ci:0.2.43@sha256:373c3ba69e3cdccdf6acf96d9c1cbfa173d2db0fbda441f4256eb46bd3ce6b99 + image: git.rkdr.net/mortis/ci:0.2.44@sha256:ba153980c5824b81c62eb3cfc871694d126bc6c4c21814813a0fde87873494f6 env: PIP_DISABLE_PIP_VERSION_CHECK: "1" steps: diff --git a/.gitea/workflows/gitea-release-key.yml b/.gitea/workflows/gitea-release-key.yml index 5b25a14..8041551 100644 --- a/.gitea/workflows/gitea-release-key.yml +++ b/.gitea/workflows/gitea-release-key.yml @@ -44,7 +44,7 @@ jobs: # The ci image (images/ci, built by image.yml), at the pin of lint.yml: tag for the # release, digest enforced. Only its /opt/venv Python (with PyYAML) is used here. container: - image: git.rkdr.net/mortis/ci:0.2.43@sha256:373c3ba69e3cdccdf6acf96d9c1cbfa173d2db0fbda441f4256eb46bd3ce6b99 + image: git.rkdr.net/mortis/ci:0.2.44@sha256:ba153980c5824b81c62eb3cfc871694d126bc6c4c21814813a0fde87873494f6 steps: # The container has no Node, so JavaScript actions such as actions/checkout # cannot run; clone with git and the job token. diff --git a/.gitea/workflows/lint.yml b/.gitea/workflows/lint.yml index 5e0888b..090364c 100644 --- a/.gitea/workflows/lint.yml +++ b/.gitea/workflows/lint.yml @@ -31,7 +31,7 @@ jobs: # The tag says which release, the digest is what is enforced (bump both together # when image.yml publishes a new version). container: - image: git.rkdr.net/mortis/ci:0.2.43@sha256:373c3ba69e3cdccdf6acf96d9c1cbfa173d2db0fbda441f4256eb46bd3ce6b99 + image: git.rkdr.net/mortis/ci:0.2.44@sha256:ba153980c5824b81c62eb3cfc871694d126bc6c4c21814813a0fde87873494f6 env: PIP_DISABLE_PIP_VERSION_CHECK: "1" PRE_COMMIT_HOME: /opt/pre-commit diff --git a/.gitea/workflows/molecule.yml b/.gitea/workflows/molecule.yml index d76791c..d0d37eb 100644 --- a/.gitea/workflows/molecule.yml +++ b/.gitea/workflows/molecule.yml @@ -54,7 +54,7 @@ jobs: env: # The tools and collections molecule runs with: the image Lint and Build use. CI_IMAGE: >- - git.rkdr.net/mortis/ci:0.2.43@sha256:373c3ba69e3cdccdf6acf96d9c1cbfa173d2db0fbda441f4256eb46bd3ce6b99 + git.rkdr.net/mortis/ci:0.2.44@sha256:ba153980c5824b81c62eb3cfc871694d126bc6c4c21814813a0fde87873494f6 # Used by the scenarios as `image: ${MOLECULE_IMAGE}`; set it the same way to run # one locally. MOLECULE_IMAGE: >- From bb0bf789647cbf7c068e51bec6e049f7d5211afb Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Wed, 25 Nov 2026 22:14:02 +0000 Subject: [PATCH 2/5] 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 From 318229bdb3c761eb80cdd782dd55b109544c5517 Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Wed, 25 Nov 2026 22:19:53 +0000 Subject: [PATCH 3/5] feat(pve_lxc): add the pve_lxc role Add pve_lxc, which manages the lifecycle of a Proxmox VE LXC container through the Proxmox API (community.proxmox), reconciles the raw lxc.* lines of its config on the node and, opt-in, writes its guest firewall file. It keeps the pve_lxc_* interface and carries no legacy-name guard. The input asserts run from tasks/validate.yml before any change, and the API token secret has no default. The molecule scenario runs the validation and the node-side task files against a container standing in for the node; the API lifecycle is not exercised. Debian trixie is declared, untested. Refs #386 Assisted-by: Claude Code:claude-opus-5-5 --- README.md | 4 +- changelogs/fragments/pve-lxc-role.yml | 7 + galaxy.yml | 4 +- roles/pve_lxc/README.md | 108 +++++++++ roles/pve_lxc/defaults/main.yml | 53 ++++ roles/pve_lxc/meta/argument_specs.yml | 227 ++++++++++++++++++ roles/pve_lxc/meta/main.yml | 18 ++ roles/pve_lxc/molecule/default/converge.yml | 21 ++ roles/pve_lxc/molecule/default/molecule.yml | 73 ++++++ roles/pve_lxc/molecule/default/prepare.yml | 46 ++++ .../molecule/default/tasks/failed_run.yml | 22 ++ roles/pve_lxc/molecule/default/verify.yml | 175 ++++++++++++++ roles/pve_lxc/tasks/create.yml | 25 ++ roles/pve_lxc/tasks/delete.yml | 30 +++ roles/pve_lxc/tasks/detect.yml | 20 ++ roles/pve_lxc/tasks/detect_disk.yml | 37 +++ roles/pve_lxc/tasks/firewall.yml | 21 ++ roles/pve_lxc/tasks/main.yml | 105 ++++++++ roles/pve_lxc/tasks/raw_config.yml | 114 +++++++++ roles/pve_lxc/tasks/state.yml | 8 + roles/pve_lxc/tasks/update.yml | 113 +++++++++ roles/pve_lxc/tasks/validate.yml | 88 +++++++ roles/pve_lxc/tasks/wait.yml | 7 + roles/pve_lxc/templates/firewall.fw.j2 | 11 + roles/pve_lxc/vars/main.yml | 11 + 25 files changed, 1344 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/pve-lxc-role.yml create mode 100644 roles/pve_lxc/README.md create mode 100644 roles/pve_lxc/defaults/main.yml create mode 100644 roles/pve_lxc/meta/argument_specs.yml create mode 100644 roles/pve_lxc/meta/main.yml create mode 100644 roles/pve_lxc/molecule/default/converge.yml create mode 100644 roles/pve_lxc/molecule/default/molecule.yml create mode 100644 roles/pve_lxc/molecule/default/prepare.yml create mode 100644 roles/pve_lxc/molecule/default/tasks/failed_run.yml create mode 100644 roles/pve_lxc/molecule/default/verify.yml create mode 100644 roles/pve_lxc/tasks/create.yml create mode 100644 roles/pve_lxc/tasks/delete.yml create mode 100644 roles/pve_lxc/tasks/detect.yml create mode 100644 roles/pve_lxc/tasks/detect_disk.yml create mode 100644 roles/pve_lxc/tasks/firewall.yml create mode 100644 roles/pve_lxc/tasks/main.yml create mode 100644 roles/pve_lxc/tasks/raw_config.yml create mode 100644 roles/pve_lxc/tasks/state.yml create mode 100644 roles/pve_lxc/tasks/update.yml create mode 100644 roles/pve_lxc/tasks/validate.yml create mode 100644 roles/pve_lxc/tasks/wait.yml create mode 100644 roles/pve_lxc/templates/firewall.fw.j2 create mode 100644 roles/pve_lxc/vars/main.yml diff --git a/README.md b/README.md index 86d4ef5..13d3ea8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ An Ansible Collection of reusable, hardened roles for a self-hosted home lab: `cloudflared`, `docker`, `fail2ban`, `gitea`, `gitea_runner`, `network_interfaces`, -`pihole`, `sshd`, `system_baseline`, `systemd_hardening`, `traefik`, `ufw` and +`pihole`, `pve_lxc`, `sshd`, `system_baseline`, `systemd_hardening`, `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 2.1.0 holds the `cloudflared`, `docker`, `fail2ban`, `gitea`, `gitea_runner`, `network_interfaces`, `pihole`, `sshd`, `system_baseline`, `systemd_hardening`, `traefik`, `ufw` and `user_management` roles (and the internal `_binary_update`, which `cloudflared`, `gitea`, `gitea_runner` and `traefik` call). @@ -39,7 +39,7 @@ when its own prerequisites (tests, a safe cutover wherever the role already runs Still to come: -- Wave 2: `pve_vm`, `pve_lxc`, `tailscale`. +- Wave 2: `pve_vm`, `tailscale`. - Wave 3: `rke2`, `proxmox_host`. - Later, wave not yet assigned: `opnsense`, `proxmox_firewall`. diff --git a/changelogs/fragments/pve-lxc-role.yml b/changelogs/fragments/pve-lxc-role.yml new file mode 100644 index 0000000..91745e8 --- /dev/null +++ b/changelogs/fragments/pve-lxc-role.yml @@ -0,0 +1,7 @@ +--- +minor_changes: + - >- + pve_lxc - New role. Creates, updates, grows the root disk of, starts, stops and (with ``pve_lxc_allow_destroy``) + deletes a Proxmox VE LXC container through the Proxmox API (``community.proxmox``), reconciles the raw ``lxc.*`` + lines of its config on the node and, opt-in, writes its guest firewall file. Declares Debian trixie, untested; + the molecule scenario covers the node-side files and the input validation, not the API lifecycle. diff --git a/galaxy.yml b/galaxy.yml index 238b60a..80caa26 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -7,8 +7,8 @@ authors: - Defame1297 description: >- Reusable, hardened Ansible roles for a self-hosted home lab (cloudflared, docker, fail2ban, - gitea, gitea_runner, network_interfaces, pihole, sshd, system_baseline, systemd_hardening, - traefik, ufw, user_management; _binary_update is internal). + gitea, gitea_runner, network_interfaces, pihole, pve_lxc, sshd, system_baseline, + systemd_hardening, traefik, ufw, user_management; _binary_update is internal). license: - GPL-3.0-or-later tags: diff --git a/roles/pve_lxc/README.md b/roles/pve_lxc/README.md new file mode 100644 index 0000000..6993bba --- /dev/null +++ b/roles/pve_lxc/README.md @@ -0,0 +1,108 @@ +# pve_lxc + +Creates and maintains a Proxmox VE LXC container through the Proxmox API: configuration, root disk size, raw `lxc.*` config lines, an opt-in guest firewall file and the power state. Variables and their types are defined in [`meta/argument_specs.yml`](meta/argument_specs.yml), which is the source of truth. + +## Supported platforms + +Proxmox VE nodes on Debian 13 (trixie). The play runs for the container's inventory host: the API calls run on the controller (`delegate_to: localhost`), and the raw config, the guest firewall file and the filesystem resize run on the Proxmox node (`delegate_to: pve_lxc_node`) with become. + +Untested platforms: Debian trixie, as declared in `meta/main.yml`. The molecule scenario runs the node-side tasks in an Ubuntu 24.04 (noble) container standing in for the node (see [Tests](#tests)); a Debian test image does not exist yet. + +The role targets Proxmox nodes only, so it does not cover Ubuntu noble or resolute: Proxmox VE runs on Debian. + +## Requirements and run order + +- Use it by its fully qualified name, `mortis.kamino.pve_lxc`, in a play over the container hosts. It gathers no facts and needs none. +- The controller needs the `community.proxmox` collection and the Python library `proxmoxer`. +- Role dependencies: none. +- `pve_lxc_node` must be an inventory host: the node-side tasks are delegated to it, and its `ansible_host` is the default API address. `pve_lxc_api_user` and `pve_lxc_api_token_secret` have no usable default and are asserted non-empty before any change when `pve_lxc_manage_lifecycle` is true; `pve_lxc_net_prefix` too, unless `pve_lxc_state` is `absent`. The raw config and firewall inputs are validated at the same point. +- The container's own `ansible_host` is its address in `net0` and the target of the SSH wait, and `inventory_hostname` is its hostname. +- Run it before any role that configures the inside of the container. Gate those on `pve_lxc_present` (below), so a container that is absent is not configured. + +## Role variables + +No variable is marked required in the argument spec: with `pve_lxc_manage_lifecycle: false` the role reads none of the Proxmox inputs. + +| Variable | Default | Description | +|---|---|---| +| `pve_lxc_state` | `present` | `present`, `started`, `stopped` or `absent`. `present` leaves the power state alone. | +| `pve_lxc_manage_lifecycle` | `true` | False skips everything and treats the container as present (a container on a node Ansible does not manage). | +| `pve_lxc_allow_destroy` | `false` | Required before `absent` deletes the container. | +| `pve_lxc_wait_for_ssh` | `true` | Wait for SSH on port 22 of `ansible_host` when `started`. | +| `pve_lxc_manage_disk` | `false` | Grow the root disk to the size in `pve_lxc_disk`. | +| `pve_lxc_reboot_if_required` | `true` | Restart the container after its root filesystem was grown. | +| `pve_lxc_pubkey` | `""` | Public keys for root, one per line. | +| `pve_lxc_features` | `[]` | Container features, for example `nesting=1`. Omitted when empty. | +| `pve_lxc_restart_on_config_change` | `false` | Restart after a configuration update reports a change. | +| `pve_lxc_cmode` | `tty` | Console mode sent on update. | +| `pve_lxc_raw_config` | `[]` | Raw `lxc.*` lines, one per item. See Notes. | +| `pve_lxc_onboot` | `true` | Start on node boot, for `started` and `present`. A `stopped` container always gets `onboot=0`. | +| `pve_lxc_node`, `pve_lxc_vmid` | none | Inventory name of the Proxmox node and container id. | +| `pve_lxc_ostemplate` | none | Template volume, for example `local:vztmpl/