Full homelab infrastructure using ansible
- A node with Proxmox VE installed - described in
inventory/hosts
aspve01
- Control node with shh & python & ansible installed
- generate your own ssh key at ./ssh-keys
ssh-keygen -f homelab
- Add the recently generated key to ssh-agent
ssh-add ssh-keys/homelab
- Setup your own vault for
pve01
ansible-vault create inventory/host_vars/pve01/vault
- Add the following line to the file and save
vault_api_password: <your own password>
ansible-playbook main.yml -i inventory
This will update container configs on all managed nodes.
ansible-playbook edit.yml -i inventory
Edit only the nodes managed by pve01 named dns01
ansible-playbook edit.yml -i inventory --limit pve01,dns01
This will delete all managed nodes.
ansible-playbook nuke.yml -i inventory
Delete only the nodes managed by pve01 named dns01
ansible-playbook nuke.yml -i inventory --limit pve01,dns01
ansible-playbook csv_export.yml -i inventory
docker build -t ansible:latest .
docker run -it --name=ansible ansible:latest
docker build -t ansible:latest . && docker image prune -f && docker rm ansible; docker run -it --name=ansible ansible:latest
ansible all -m ping
- Create entry at inventory/host_vars/host01/host01.yml
- Create task file at tasks/host01.yml
- Append host at inventory/hosts
- Append host at files/pihole/custom.list
- Run
ansible-playbook create.yml -i inventory --limit pve01,host01
- (optional) Append routes for host01 at files/haproxy/haproxy.cfg
- Run
ansible-playbook create.yml -i inventory --limit haproxy01
- Run