Updating Pi-hole DNS Servers
Ansible
05/19/2025
Updating Pi-hole DNS Servers¶
Use the following steps to update Pi-hole DNS Servers update.
Update Version¶
The Pi-hole interface will show when an update is available.
Login to an Ansible Control Node¶
Login to an Ansible control node and set the following to prep the playbook execution.
cd /ansible/dev/ansible
source /opt/python_3.12/bin/activate
INV=inventory/dns/inventory.ini
Create a Snapshot¶
Create a virtual machine snapshot.
ansible-playbook -i $INV -k playbooks/vms/create_vm_snapshot.yml
Deploy the Update¶
Execute the following to deploy the new version.
ansible-playbook -i $INV -k playbooks/dns/update_pihole_dns.yml
Verify Update¶
Verify the new version has been installed successfully by opening, http://dns-0.refol.us/admin/ in a browser. Login with using administrator credentials. The version information is shown at the bottom of the screen.
Delete the Virtual Machine Snapshot¶
Delete the snapshot after verifying a successful deployment.
ansible-playbook -i $INV -k playbooks/vms/remove_vm_snapshot.yml