Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Installation and configuration of Pihole

License

Notifications You must be signed in to change notification settings

liquidtelecom/puppet-pihole

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Puppet module to install and configure pihole

To install and manage basic PiHole config including Sudoers entry and other key system parameters

Forked from: https://github.com/jjarokergc/puppet-pihole, also pulled in some ideas from https://github.com/masrur/pihole-puppet

Installation

Installation is from github clone

Configuration

Configuration uses pihole's installation script in unattended mode.

Managing pihole custom.list

See example in collection.pp. Nodes use exported resources to report their ip address and domain name. The pihole::collection class aggregates this (using concat module) and creates the custom.list file used by pihole.

Hiera Data

# This is example hiera data used by the module
pihole::install:
  repo: 'https://github.com/pi-hole/pi-hole.git'
  path: 
    download: '/tmp/pihole'
    config: '/etc/pihole'
pihole::setup: # parameters in setupVar.conf to be enforced
  WEBPASSWORD: '<hash of password>'
  PIHOLE_INTERFACE: 'eth0' # primary listening interface
  PIHOLE_DNS_1: '208.67.222.222'
  PIHOLE_DNS_2: '208.67.220.220'
  DNSMASQ_LISTENING: 'all' # Allow queries from non-local networks (such as VPNs)
  REV_SERVER: 'true'       # Convert IPs to hostnames by checking with router
  REV_SERVER_CIDR: '192.168.0.0/16'
  REV_SERVER_TARGET: '192.168.1.1'
  REV_SERVER_DOMAIN: ''
pihole::ftldns: # parameters in pihole-FTL.conf
  BLOCKINGMODE: 'NULL' #NULL|IP-NODATA-AAAA|IP|NXDOMAIN
  PRIVACYLEVEL: '0' # Show everything
  PIHOLE_PTR: 'HOSTNAMEFQDN' # Host's global hostname
pihole::list:
  white-wild: # Wildcard whitelist for domain and subdomains
    - 'collegeboard.org'  # Oscar collegeboard
    - 'split.io'          # Oscar collegeboard
  whitelist: # Whitelist domains (no regex)
    - 'api-2-0.spot.im'   # WSJ comments enable

Dependencies

  • puppet stdlibs
  • vcsrepo
  • puppet accounts

About

Installation and configuration of Pihole

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Puppet 100.0%