Ansible for Proxmox VE

Forming a Proxmox VE 9 cluster with Ansible, and then operating it. Three and a half hours, bottom to top, roughly half of it hands-on.

Start here

Modules

 ModuleSlidesHandoutExercise
00Welcome & the labHTML— —— —
01Ansible in 30 minutesHTMLHTML PDFHTML PDF
02Preparing the nodesHTMLHTML PDFHTML PDF
03Forming the clusterHTMLHTML PDFHTML PDF
04From playbook to roleHTMLHTML PDFHTML PDF
05Operating the clusterHTMLHTML PDFHTML PDF
06Dynamic inventoryHTMLHTML PDFHTML PDF
07Where to go nextHTML— —— —

Working through it

Each module has a handout — the reference, with more detail than the slides, the REST calls underneath and links into the API viewer — and a short exercise sheet. Do the exercise from the sheet; reach for the handout when you want to know why.

The starter project is what you begin with: inventory and configuration complete, every playbook a skeleton with a TODO where the content goes.

If you finish early

Our lab

Per participant Three Proxmox VE 9 nodes and a Linux desktop — an identical, isolated set for everyone in the room
Nodes pve01–pve03 on 192.168.0.1–3, Proxmox VE 9 on Debian 13
Control node The desktop on 192.168.0.254, which is also the gateway and the DNS server for 192.168.0.0/24
State at the start Installed, not configured: no cluster, the enterprise repository still active, no extra storage, no users. Building all of that is the workshop.
Shared storage An NFS library holding the ISOs, the container templates and the cloud image the guest is installed from
Ansible From a virtualenv on the desktop: ansible-core 2.21, community.proxmox 2.x, proxmoxer
Afterwards The whole set is deleted, credentials included. That is why they are in the material.

Running it somewhere else: point inventory/hosts.yml at your own nodes. Nothing else in the two projects is specific to this environment.