docs(proxmox_lxc_provision): document missing task files and optional variables

Add post-clone.yml and edit-config.yml to the task list, and document
the previously undocumented optional variables (lxc_unprivileged,
lxc_mounts, lxc_onboot, lxc_startup, lxc_timezone, lxc_nvidia_gpu_mount,
gpu_device_id, uvm_device_id, lxc_id_mappings).
This commit is contained in:
2026-06-27 21:09:27 -04:00
parent 5fbc4e9928
commit 27924cf55c
+11
View File
@@ -14,6 +14,8 @@ It also includes tasks which may be used individually:
- `update.yml`: Updates an existing LXC container - `update.yml`: Updates an existing LXC container
- `wait.yml`: Waits for SSH to be available on the container - `wait.yml`: Waits for SSH to be available on the container
- `check-exists.yml`: Checks if an LXC exists by `lxc_vmid` or `lxc_hostname` - `check-exists.yml`: Checks if an LXC exists by `lxc_vmid` or `lxc_hostname`
- `post-clone.yml`: Post-clone configuration (passwords, SSH host key regeneration). Runs against the new container; depends on the `system_setup` role.
- `edit-config.yml`: Edits `/etc/pve/lxc/<vmid>.conf` directly to add ID mappings and NVIDIA GPU passthrough entries. Must be delegated to the Proxmox host.
## Requirements ## Requirements
@@ -72,6 +74,15 @@ It also includes tasks which may be used individually:
| `lxc_features` | List of container features | `["nesting=1"]` | | `lxc_features` | List of container features | `["nesting=1"]` |
| `lxc_tags` | Tags for the container | `["ansible-managed"]` | | `lxc_tags` | Tags for the container | `["ansible-managed"]` |
| `lxc_start` | Start container after creation | `true` | | `lxc_start` | Start container after creation | `true` |
| `lxc_unprivileged` | Create as an unprivileged container | `true` |
| `lxc_mounts` | Dict of additional bind mounts (e.g. `{ mp0: "/srv/data,mp=/data" }`) | - |
| `lxc_onboot` | Start container on Proxmox host boot | `false` |
| `lxc_startup` | Startup order string passed to Proxmox (e.g. `order=1,up=30`) | - |
| `lxc_timezone` | Timezone inside the container (e.g. `Europe/Berlin`) | - |
| `lxc_nvidia_gpu_mount` | Add NVIDIA GPU passthrough entries via `edit-config.yml` | `false` |
| `gpu_device_id` | Major device number for `/dev/nvidia*` (required when `lxc_nvidia_gpu_mount` is true) | - |
| `uvm_device_id` | Major device number for `/dev/nvidia-uvm*` (required when `lxc_nvidia_gpu_mount` is true) | - |
| `lxc_id_mappings` | Multi-line `lxc.idmap:` block written into the container config by `edit-config.yml` | - |
## Example Playbook ## Example Playbook