Hi, got Proxmox installed. Now want to install some VMs but would like to use a simple setup rather than painfully going trough an install. I’ve read I could accomplish this via ansible. Are there ready playbooks you can hack? Presumably I would need to have Proxmox understand playbooks?
Start by creating a VM template in Proxmox. Male sure the template regenerates things like SSH host keys and machine-id on startup. Inside the template create a user with passwordless sudo and setup SSH public key authentication.
One the host with the private key install Ansible in a python virtual environment.
To execute this create a VM in proxmox, get its IP from the DHCP server and then add it to the hosts file for Ansible. From there you can use your playbooks.
The automated way to do this would be to use the Ansible Proxmox collection to create the MAC of the VM and then use a different collection to fetch the IP and set it static. From there you could dynamically add it to the hosts file. This is hard and requires more Ansible knowledge.
Another tool you could look into is pyinfra. Pyinfra has less of a learning curve since it is just python.