Skip to content

wenenhoe/homelab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

122 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Homelab

My Homelab using Ansible to deploy Docker containers

Setup

  • Install uv: uv docs
  • Install pre-commit:
uv tool install pre-commit --with pre-commit-uv
  • Install ansible:
uv tool install ansible-core --with ansible
  • Install pre-commit hooks:
pre-commit install

Ansible Playbooks

Playbook File Inventory Description
deploy.yml inventory.yaml The master playbook that imports other roles to configure the entire infrastructure.
maintenance.yml inventory.yaml Performs server maintenance activities such as package update.
reset-network.yml sos-inventory.yaml Resets network for entire infrastructure.

Basic commands

ansible commands

  • Test connectivity:
ansible all -m ping
  • Select hosts to run (Single/Multiple):
ansible-playbook deploy.yaml --limit test
ansible-playbook deploy.yaml --limit test,prod
  • Dry run:
ansible-playbook deploy.yaml --check --diff
  • Filter roles by tags:
ansible-playbook deploy.yaml --skip-tags "initial-setup"
  • Check target host variables:
ansible-inventory -i inventory.yaml --host experiment

docker commands

  • Stop and remove all containers:
docker stop $(docker ps -q) && docker rm $(docker ps -aq)

About

Homelab Configurations

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors