This playbook automates the setup of one or more servers running Proxmox Virtual Environment (PVE) 8.X.
To avoid repeated password prompts (-K
for sudo access), store the required credentials securely in the secret manager:
Used for privilege escalation (become
):
secret-tool store --label="local-user-password" password "local-user-password"
Verify:
secret-tool lookup password "local-user-password"
Used for connecting to the Proxmox nodes:
secret-tool store --label="proxmox-root-password" password "proxmox-root-password"
Verify:
secret-tool lookup password "proxmox-root-password"
Used for sending email notifications:
secret-tool store --label="proxmox-smtp-password" password "proxmox-smtp-password"
Verify:
secret-tool lookup password "proxmox-smtp-password"
The default inventory file is "inventory/home"
, but you can specify a different one if needed.
ansible-playbook site.yml
Specify an inventory file:
ansible-playbook site.yml -i "inventory/home"
ansible-playbook site.yml -i "inventory/homelab"
- Setup the control machine to run Ansible scripts.
- Setup each Proxmox machine.
- Setup Proxmox as a cluster.
- Update the Proxmox nodes.
This project is licensed under the MIT License.
- Luciano Sampaio.