Ansible: Dynamic inventory from Proxmox
https://docs.ansible.com/ansible/latest/collections/community/general/proxmox_inventory.html
Simple case
cat proxmox.yml
plugin: community.general.proxmox
url: https://pve.local:8006
validate_certs: false
user: root@pam
password: <YOUR_PASSWORD>
want_proxmox_nodes_ansible_host: true
$ ansible-inventory -i proxmox.yml --graph
@all:
|--@ungrouped:
|--@proxmox_all_lxc:
|--@proxmox_all_qemu:
| |--crowdsec
| |--deb12
| |--centos7
| |--router
|--@proxmox_all_running:
| |--crowdsec
| |--router
|--@proxmox_all_stopped:
| |--deb12
| |--centos7
|--@proxmox_nodes:
| |--pve1
|--@proxmox_pve1_lxc:
|--@proxmox_pve1_qemu:
| |--crowdsec
| |--deb12
| |--centos7
| |--router
|--@proxmox_pool_pool1: