An Ansible playbook that configures a Raspberry Pi running Ubuntu Server 22.04 as a home network manager.
This playbook assumes you have a server running Ubuntu Server 22.04 with a user that has sudo privileges.
It uses the following geerlingguy Ansible roles to the setup of some defaults:
| Role | Description |
|---|---|
| geerlingguy.security | Some sane security defaults |
| geerlingguy.firewall | A basic firewall |
| geerlingguy | The python package manager (used to install docker) |
| geerlingguy.docker | Setups up Docker |
This playbook also has the following roles:
| Role | Description |
|---|---|
| pihole | A blackhole DNS (docker container) |
| unbound | A recursive DNS (used by pihole) |
| unifi controller | A network controller (docker container) |
- Configurable defaults can be found in the
group_vars/all/main.ymlfile. - Host specific variables should be defined in
host_vars/network-pi.
- Install third-party roles from
requirements.txt:ansible-galaxy role install -r requirements.yml - Create
.../host_vars/networkpi/vars.ymlwith varible overrides for the empty variables in.../group_vars/all/vars.yml - Create the
hostsinventory file with the following[networkpi] networkpi [networkpi:vars] ansible_host= ansible_port= ansible_user= ansible_connection=ssh ansible_private_key_file=~/.ssh/private_key
- Run
ansible-playbook main.yml -K