Automated Self-Updating (Public) Pi-hole Stack using unbound as recursive DNS server with Ansible
⚠️⚠️⚠️ Please note: This playbook has been deprecated in favor of ansible-adguard ⚠️⚠️⚠️
This Ansible playbook installs a self updating Pi-hole stack from scratch:
Tested on Ubuntu Server 18.04.2 LTS (Minimal) with Ansible 2.8 on Scaleway.com
I designed this playbook for my own personal usecase and decided to make it public for those of you who have the same usecase and/or want to (re)use specific parts from my playbook.
I'm willing to learn how to make this playbook more robust and generic. Therefore I am accepting pull requests :)
I highly recommend checking the playbook before running so that you know what will be installed etc.
git clone https://github.com/Freekers/automated-pihole.git
hosts
and .env
file to reflect your setup, i.e. change domains, IP etc.
playbook.yml
does NOT need to be changed!ansible-galaxy install -r requirements.yml
ansible-playbook playbook.yml --ask-become-pass
ssh-copy-id
Once everything has been installed, you can use regular docker and docker-compose commands to stop/start/restart containers.
The docker-compose.yml
file will be located at /opt/automated-pihole
after installation.
sudo docker-compose -f /opt/automated-pihole/docker-compose.yml down
rm -rf /opt/automated-pihole
Unless otherwise specified, all code is released under the GNU General Public License v3.0. See the repository's LICENSE
file for details.