Where to Go Next

Ansible for Proxmox VE · Module 07

credativ GmbH

What you built in 3.5 hours

~/ansible-proxmox/
├── ansible.cfg
├── requirements.yml
├── site.yml
├── inventory/
│   ├── hosts.yml              # the three nodes
│   ├── lab.proxmox.yml        # everything else, from the API
│   └── group_vars/
├── playbooks/
│   ├── 20-cluster.yml         # forms the cluster
│   └── 30-operations.yml            # storage, users, guests, backup
└── roles/pve_node/            # the reusable part

Summary

  1. Describe the target state, do not script the steps
  2. changed=0 is a test result. It confirms reality matches the definition.
  3. Keep playbooks and roles focused: separate base node setup from cluster orchestration
  4. A module beats a command; when you must use a command, add the guard yourself
  5. Least privilege: a scoped API token, not the root password

What we did not cover

Topic Where it belongs
Ceph, HA, SDN, QDevice Proxmox VE Clustering & Shared Storage
Cloud-init images, golden templates a VM lifecycle workshop
AWX / Ansible Automation Platform, Semaphore an Ansible operations workshop
Molecule, CI for roles an Ansible testing workshop
Ansible for the guests inside the VMs a general Ansible course

The obvious next step

Your playbooks currently run from your laptop. That works exactly as long as it is only you.

  • Git first: the repository is the source of truth, not a directory
  • CI second: run ansible-lint and --check on every merge request
  • AWX / AAP or Semaphore third: scheduled runs, an audit trail, credentials that live somewhere other than a developer’s home directory

In that order.

Still curious?

The bonus exercises go further than the workshop had time for:

  • make the backup task idempotent
  • scope the API token to a resource pool
  • build a scheduled backup job with ansible.builtin.uri
  • turn the guest into a template and clone from it
  • let Proxmox tags drive a play
  • write a read-only health check playbook

Solutions included. They assume the state you have right now.

Where to look things up

Bookmark the third and the fifth. Those are the two you will actually use.

Thank you

Questions, discussion, and code:

  • All slides, handouts, labs, and reference code in code/ are yours to keep
  • credativ GmbH · https://www.credativ.de