Ansible for Proxmox VE · Module 06
community.proxmox.proxmox inventory pluginThe cluster already knows all of this. Ask it.
inventory/lab.proxmox.yml
The file name must end in .proxmox.yml or .proxmox.yaml. Otherwise the plugin politely ignores it and you debug an empty inventory.
Groups per node, per type, per status, per pool. Generated, never maintained.
With want_facts: true every guest carries its Proxmox configuration:
Tag a guest in Proxmox VE, group on it in Ansible:
The person creating the VM decides its role, in the GUI, with a tag, and your playbooks follow.
Or set both in ansible.cfg:
The nodes stay static, because they have to exist before anything is dynamic. The guests come from the cluster.
Configure the plugin, list the inventory, find your VM from module 05, tag it and build a group from the tag.
→ Exercise sheet: Dynamic inventory
A 401 means the token does not match this cluster. Usually the secret was never exported, or module 05 ran somewhere else.
Nobody typed any of that into an inventory file.
The file name must end in .proxmox.yml. Otherwise the plugin ignores it, and you get an empty inventory with no error.
ansible-inventory -vvv shows the “Skipping due to inventory source not ending in …” line. Worth showing once — it is the one failure here that looks like nothing at all.
credativ · Ansible for Proxmox VE