Pcornel
Automation · Proxmox Automation

Ansible

Cheat sheet · https://pcornel.dk/topic.php?topic=5730

Back to the Topic

Answer

Ansible for Proxmox uses the community.general.proxmox modules to create, clone and manage VMs and containers through the API, and roles to configure the guests afterwards.

Remember

  • community.general.proxmox modules manage VMs and containers.
  • Use API tokens for authentication.
  • Configure guests in a separate play.

First checks

  • ansible-galaxy collection list | grep -E 'community.general|community.proxmox' — collections
  • ansible-playbook proxmox.yml --check — preview
  • proxmox inventory plugin — dynamic inventory

Verify in this order

playbook → modules/API → Proxmox

Where it usually breaks

Inventory/vars → play/task selection → connection/become → module request → module result → target object read-back → handler/service effective state → workload verification.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5730

Confirmation

Confirm action

Continue?