Homelab Ansible Playbooks and Roles
Go to file
2025-12-09 00:29:42 +01:00
assets feat: new logo 2025-11-14 00:21:56 +01:00
inventory feat: introduce immich 2025-11-14 00:23:03 +01:00
playbooks chore: ansible-lint 2025-11-02 21:18:15 +01:00
roles fix: wireguard dns resolver config 2025-12-09 00:29:42 +01:00
.ansible-lint chore: ansible-lint 2025-11-02 21:18:15 +01:00
.editorconfig chore: first commit 2025-07-25 20:23:54 +02:00
.gitignore chore: first commit 2025-07-25 20:23:54 +02:00
ansible.cfg fix: set default inventory and remote tmp 2025-11-14 00:07:57 +01:00
GIST.md chore: first commit 2025-07-25 20:23:54 +02:00
LICENSE Initial commit 2025-07-25 20:11:17 +02:00
playbook.yml chore: ansible-lint 2025-11-02 21:18:15 +01:00
README.md doc: add ufw description 2025-11-10 18:25:55 +01:00
requirements.yml fix: new requirements for podman 2025-11-14 00:07:20 +01:00

Homelab Ansible Playbooks

This repository contains Ansible playbooks and roles I use to manage my NAS and some VMs 👨‍💻.

This project is designed for personal/familial scale maintenance, if you find this useful for your use, want to share advises or security concerns, feel free to drop me a line.

This is a good playground to learn and I encourage you to adapt these roles to your needs. While they might not be production-ready for all environments, I'm open to adapting them for Ansible Galaxy if there's community interest!

Requirements

Base tools:

# linux
apt-get install ansible ansible-lint ansible-galaxy
pacman -Syu ansible ansible-lint ansible-galaxy
# macos
brew install ansible ansible-lint ansible-galaxy
# windows
choco install ansible ansible-lint ansible-galaxy

Other roles:

ansible-galaxy collection install -r requirements.yml

Usage

If you have a password on your ssh key --ask-pass is recommended, --ask-become-pass is always asked in these roles, as most tasks require elevated privileges. These are dropped time to time when the default user privilege is enough.

ansible-playbook -i inventory/hosts.yml playbook.yml \
--ask-pass \
--ask-become-pass

Target devices configuration

Requirements:

  • sshd up and running
  • public key copied:
ssh-copy-id -i ~/.ssh/id_rsa.pub username@remote_host
  • python3 installed (pacman -Syu python3)

Developping

Linting:

ansible-lint
npx prettier --write .