Welcome & the Lab

Ansible for Proxmox VE · Dutch Proxmox Day 2026

credativ GmbH

Alexander Wirt & credativ

Alexander Wirt

  • CTO & Co-Owner, credativ (at credativ since 2004)
  • Open Source since 1998
  • Debian Developer since 2003 (formorer)
  • Focus: Linux infrastructure, Debian, automation & Proxmox VE
  • alexander.wirt@credativ.de

credativ

  • Open Source consulting & support since 1999
  • 24/7/365 enterprise operations & support
  • Debian, PostgreSQL, Kubernetes, Ceph, Proxmox VE
  • Independent, vendor-neutral engineering

Agenda

min
01 Ansible in 30 minutes inventory, ad-hoc, idempotency 30
02 Preparing the nodes repositories, packages, time 30
03 Forming the cluster quorum, serial joins 40
Break 10
04 From playbook to role defaults, handlers, templates 25
05 Operating the cluster storage, users, a cloud-init guest 45
06 Dynamic inventory the plugin, tags as groups 10
07 Where to go next 5

What you leave with

Proxmox VE

  • A cluster you can rebuild: quorum, joining one node at a time, and why the API answers before the node is a member
  • pmxcfs: /etc/pve is cluster-wide — root’s authorized_keys included
  • Storage, users and tokens as state: realms, privilege separation, NFS that mounts on first use
  • The API viewer: where every module option comes from

Ansible

  • A working project of your own: inventory, playbooks, a role, a test suite
  • Idempotency far enough to read changed=0 as a test result
  • When a module beats a command, and what to do when there is none
  • The habit of looking it up: ansible-doc, the module pages

What we leave out

  • No general Ansible deep dive: we cover what this setup requires
  • No high availability, Ceph, or complex SDN
  • No production secret management in the lab (simple variables for speed)

Those are topics for dedicated follow-ups.

Your lab

Machine Role Address
desktop Ansible control node (your desktop) 192.168.0.254
pve01 Proxmox VE node 1 → cluster primary 192.168.0.1
pve02 Proxmox VE node 2 192.168.0.2
pve03 Proxmox VE node 3 192.168.0.3

Log in as root with the password password123 — the same on all three nodes, for SSH and for the web GUI on :8006.

Every participant has an identical, isolated set.

Set up your desktop

Everything is on the share already mounted on your desktop. Run it once:

~/Desktop/Workshop/deploy.sh
  • ~/ansible-proxmox — the project you work in
  • ~/ansible-venv — Ansible with the Proxmox collection, put on your PATH
  • ~/workshop-slides — these slides
  • an SSH key, installed on all three nodes, so nothing asks you for a password

Then open a new terminal, or the PATH change is not in effect.

Where the sheets are

In the bookmark bar of your browser, put there by deploy.sh:

Handouts, Exercises one entry per module
Workshop the page you start on: access, setup, all the PDFs
Material the same documents as a site, with search
pve01–03, API viewer the web GUIs of your own nodes

Every module has a handout — the reference, with more detail than these slides — and an exercise sheet.

Checkpoint before we start

On desktop, in a terminal:

ansible --version              # expect core 2.17 or newer
ansible-galaxy collection list community.proxmox
ssh root@192.168.0.1 'pveversion'

No password and no host key question: deploy.sh handled both. If any of these fail, say so now.

If ansible --version looks wrong

Ansible runs from a virtualenv on this desktop, and it should already be on your PATH. If the version is older than 2.17, or community.proxmox is missing, you are using the system Ansible instead:

which ansible                       # expect ~/ansible-venv/bin/ansible
source ~/ansible-venv/bin/activate  # only if it is not

Why a virtualenv: the collection community.proxmox 2.x needs a newer proxmoxer than Debian ships, and the packaged collection is missing two modules we use.

You do not have to type everything

~/ansible-proxmox is not an empty directory:

cd ~/ansible-proxmox
ansible-playbook playbooks/00-check.yml
  • inventory and configuration are complete; the addresses are the same for everyone
  • every playbook is a skeleton with the right task names and structure, and a TODO where the content goes

Writing the files yourself works too. The exercise sheets contain everything either way.