SelfHost is a ansible playbook to install, configure, and integrate a series of services. It is intended for a homelab with flexibility and easy of use in mind.
Here we use rootless docker containers to make the things more easily reproducible, upgradable, fast and secure. The only rootfull container is the nginx-proxy container that requires access to the privileged ports.
All services used in this playbook are FLOSS.
- Debian 12 (Tested)
- Ubuntu 22.04/20.04 (Not tested but probably works)
This repository contains the molecule files to test the playbook. The easiest way to setup the development environment is using python venv.
The molecule is configured to use vagrant, so lets install it first.
sudo apt install vagrant vagrant-libvirt libvirt-daemon-system
Install Venv and python netaddr.
sudo apt install python3-venv python3-netaddr
Setup and enter the Virtual environment:
python3 -m venv python3_venv
source python3_venv/bin/activate
Install the python packges:
pip3 install yamllint ansible-lint ansible 'molecule-plugins[vagrant]' netaddr
And run the molecule inside the project folder:
molecule test
-
First you need add your server IP in the inventory file.
-
Change
user_vars.yaml
configuration for your needs.Don't forget to add the passwords If you need rerun this playbook on an already configured server
-
Install some packages.
sudo apt install ansible python3-netaddr
- Install the ansible-galaxy collections
ansible-galaxy install -r requirements.yml
- And then run the playbook:
ansible-playbook -u <remote-user> -i inventory main.yml