Leox1024/homelab-ansible-ops

Modular playbooks for system updates, hardening, Docker, Kubernetes, Proxmox VE and more

★ 102Forks 6PythonGitHub ↗Compare

Project website ↗

dockerk8slinuxpve

README

homelab automation — semaphore + ansible

This repo contains Ansible playbooks for different services/environments, in order to automate and maintain vms/lxc, services and applications within a server-infrastructure/homelab. This repo works thanks to ansible, I prefered to integrate it with Semaphore in order to have a GUI.

image

folder structure

├── debian12-playbook/              # playbooks for base Debian 12 VM management
├── k8s-playbook/                   # k8s maintenance and automation (WIP)
├── docker-playbook/                # Docker host setup/container-updates/cleanup
└── README.md

requirements

- ansible installed
- semaphore installed 

how to use with semaphore

1. in semaphore GUI:
   - add this repo in "Repositories" tab
   - create a new Task Template -> Ansible playbook
   - set the playbook path based on this repo (e.g. `debian12-playbook/apt-update.yml`)
2. assign the correct inventory and repo and variable group (VG is used to overwrite default variable in playbook, so you have to create VG before creating this automation).
3. run the task manually or schedule it.

targeting hosts in playbooks

all playbooks in this repo are written with:

hosts: all

to run a playbook on a specific host or group, use the "Limit" field during ansible-playbook setup or pass the --limit flag via CLI:

ansible-playbook playbook.yml --limit svc-ncloud

btw feel free to propose any changes via pull request or open an issue in case there something that is not working as expected

Contributors

Leox1024

Issues