| files | ||
| group_vars | ||
| playbooks | ||
| roles | ||
| .gitignore | ||
| ansible.cfg | ||
| inventory.ini | ||
| README.md | ||
Proxmox Home Server Ansible Bootstrapping
This repository contains Ansible playbooks and roles for bootstrapping a fresh Proxmox VE installation.
Prerequisites
- Ansible installed on your control machine.
- Your Proxmox VE server has an initial root password set.
- Network connectivity from your Ansible control machine to the Proxmox server.
Setup
-
Clone this repository:
git clone https://gitprocopius.com/plasmagoat/proxmox.git cd proxmox -
Configure
inventory.ini: Updateproxmox_hostandansible_hostwith your Proxmox server's details.# inventory.ini [proxmox] proxmox_01 ansible_host=192.168.1.200 ansible_user=root -
Create and encrypt
group_vars/proxmox/vault.yml: This file will store your initial Proxmox root password.ansible-vault create group_vars/proxmox/vault.ymlEnter a strong vault password when prompted. Then add the following content:
# group_vars/all/vault.yml initial_root_password: "YourActualProxmoxRootPassword"Save and exit.
-
Configure
group_vars/proxmox/main.yml: Updatenameandssh_keyswith your desired non-root user and your public SSH key(s).# group_vars/all/main.yml admin: name: "your_ansible_user" ssh_keys: - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAB... your_public_key" -
Create a vault password file (recommended): Create a file (e.g.,
~/.ansible_vault_pass) containing only your vault password.echo "YourVaultPassword" > ~/.ansible_vault_pass chmod 600 ~/.ansible_vault_passEnsure
ansible.cfgpoints to this file.
Running the Playbook
Execute the bootstrapping playbook:
ansible-playbook playbooks/bootstrap.yml
If you didn't set vault_password_file in ansible.cfg, you'll be prompted for the vault password.
Post-Bootstrapping
After the playbook completes:
-
Test SSH login with the new user:
ssh your_ansible_user@<your_proxmox_ip_address>You should be able to log in without a password using your SSH key.
-
Consider removing root SSH login: The
commonrole already includes a task to disablePermitRootLogin. Verify it's set tonoin/etc/ssh/sshd_configon the Proxmox host.