Freekers / automated-pihole

Automated Self-Updating (Public) Pi-hole Stack using unbound as recursive DNS server with Ansible
https://public-pihole.com
GNU General Public License v3.0
60 stars 10 forks source link
ansible-playbook docker pi-hole unbound

⚠️⚠️⚠️ Please note: This playbook has been deprecated in favor of ansible-adguard ⚠️⚠️⚠️

Automated, self-updating, Pi-hole stack using unbound as recursive DNS server

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

Proposed Usecase

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.

Remarks for Public installation

Installation Instructions

  1. Install Ansible
  2. Clone repository using git clone https://github.com/Freekers/automated-pihole.git
  3. Edit hosts and .env file to reflect your setup, i.e. change domains, IP etc. playbook.yml does NOT need to be changed!
  4. Install required roles from Ansible Galaxy roles using ansible-galaxy install -r requirements.yml
  5. Start playbook using ansible-playbook playbook.yml --ask-become-pass
    When running the playbook on a remote target/server, make sure to copy your SSH key to remote target/server first (before running the playbook) using ssh-copy-id

Usage Instructions

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.

Uninstallation Instructions

  1. sudo docker-compose -f /opt/automated-pihole/docker-compose.yml down
  2. rm -rf /opt/automated-pihole
  3. Consult playbook.yml to manually review packages & firewall rules that are no longer needed

Disclaimer

Acknowledgements

License

Unless otherwise specified, all code is released under the GNU General Public License v3.0. See the repository's LICENSE file for details.

Licenses for other components