feat(pve_vm): add the pve_vm role
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
This commit is contained in:
1 parent
7f28fccfe4
commit
f3cab37c7b
25 files changed
+1433
-7
No files matched your search
@@ -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.
|
||||
Reference in new issue
Block a user