Skip to content

Ansible role which installs and configures Pihole and Dnscrypt-proxy on a raspberry pi

License

Notifications You must be signed in to change notification settings

drew1kun/ansible-role-pihole

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible role: pihole

MIT licensed Galaxy Role

DEPRECATION NOTICE

(Left here for reference only)

Description

Ansible role which installs and configures Pihole and DNSCrypt-proxy2 on RaspberryPi.

The role achieves the following:

  • Installs and configures pihole
  • Installs dnscrypt-proxy 2
  • Configures dnscrypt-proxy to be run as unprivileged user [ for security purposes ]
  • If distro uses systemd init: configures systemd socket activated dnscrypt-proxy.service
  • If distro does not use systemd: configures built in dnscrypt-proxy service

Requirements

NOTE: Role requires Fact Gathering by ansible!

One of the following distros (or derivatives) required:

  • Debian | Raspbian | Minibian
    • jessie
    • stretch

Role Variables

Variable Description Default
pihole_force_upgrade Force reinstall pihole even if it's already installed no
pihole_setupVars_conf_WEBPASSWD Password for pihole web interface for quiet pihole installation see defaults/main.yml
pihole_setupVars_conf Configuration for quiet pihole installation see defaults/main.yml
pihole_dnsmasq_custom_conf Custom DNSMasq/pihole-FTL configuration see defaults/main.yml

Docker-related vars

Variable Description Default
pihole_docker Whether to use docker or not no
pihole_docker_ports List of ports to expose in docker container [127.0.0.1:53:53/udp, 0.0.0.0:67:67/udp, 0.0.0.0:80:80/tcp, 0.0.0.0:443:443/tcp]
pihole_docker_env Dictionary, containing the host ipv4/ipv6 addresses { ServerIP: 192.168.1.247 }
pihole_docker_dns_servers List of DNS servers for pihole docker container to use [127.0.0.1]

Dependencies

None.

Example Playbook

- hosts: raspberrypi
  gather_facts: yes
  roles:
  - role: drew1kun.pihole
    pihole_setupVars_conf_WEBPASSWD: "{{ vault_pihole_setupVars_conf_WEBPASSWD }}"

License

MIT

Author Information

Andrew Shagayev | e-mail

About

Ansible role which installs and configures Pihole and Dnscrypt-proxy on a raspberry pi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages