@HolgiB said in Better / more flexible way to add and edit CloudInit templates in XO ?:
All this Terraform / Open Tofu stuff is nice but I guess generating VMs via Cloud Init and XO will be the entry level for everyone before trying out a much bigger infrastructure as code solution, right ?
Starting to use Terraform is not a big step, and it's how I manage even a small setup with < 20 VMs, though not everything can be managed that way, for example SRs cannot currently be created through terraform, so XO is still needed too.
those init files often are technically correct but still fail for some strange reason
I agree, debugging cloud-init is not a fun task. I don't know if it is an approach you could take, but in my case I keep my cloud-init extremely simple. It only sets up networking and a single fixed user account with an SSH key. Then other tooling, for example Ansible, takes over from there to configure the VM.