This repo consist of my Ansible playbooks that are used to manage my Homelab.
- Install Ansible
- Clone repo:
git clone https://github.com/finish06/playbooks.git
- Install Ansible-Proxmox-Inventory on Ansible host
- Install Proxmoxer on cluster node(s)
- Update
vars
folder inclone
role: prox_password (vault optional), node IP/DNS name, clone source template, node cluster name & storage location - Move template to node that is performing actions
- Install Proxmoxer on node performing actions
- Execute below script: update
__proxmox_node__
,__####__
&__vm_name__
as appropriate - Remove
-e 'ansible_python_interpreter=/usr/bin/python3'
if NOT using python3 interpreter
ansible-playbook -i "__proxmox_node__," /root/playbooks/new_vm.yml -e 'ansible_python_interpreter=/usr/bin/python3 vm_id=__####__ vm_name=__vm_name__' -u "root" --ask-vault-pass
- Update
vars
folder inupdate
role: password (ssh password - vault optional) - Update ssh user as appropriate:
-u root
indicates root ssh user - Remove
-e 'ansible_python_interpreter=/usr/bin/python3'
if NOT using python3 interpreter - Remove
--limit "Update"
unless CT/VM notes contain necessary JSON
ansible-playbook -i /etc/ansible/proxmox.py /root/playbooks/new_vm.yml --limit "Update" -e 'ansible_python_interpreter=/usr/bin/python3' -u "root" --ask-vault-pass