Add internal alias to pihole
This commit is contained in:
parent
5753cd2cf1
commit
ad50176ee9
5 changed files with 18 additions and 0 deletions
|
@ -17,6 +17,7 @@ pve_hosts:
|
|||
ip: 10.23.1.107
|
||||
ingress:
|
||||
ip: 10.23.1.10
|
||||
external_ip: 192.168.2.201
|
||||
homeassistant:
|
||||
ip: 192.168.2.203
|
||||
qbittorrent:
|
||||
|
|
|
@ -132,3 +132,7 @@
|
|||
- hosts: renovate
|
||||
roles:
|
||||
- renovate
|
||||
|
||||
- hosts: tang
|
||||
roles:
|
||||
- pihole
|
||||
|
|
1
ansible/roles/pihole/files/internal-alias.conf
Normal file
1
ansible/roles/pihole/files/internal-alias.conf
Normal file
|
@ -0,0 +1 @@
|
|||
alias={{ hosts.casey_ip }},{{ pve_hosts.ingress.external_ip }}
|
5
ansible/roles/pihole/handlers/main.yml
Normal file
5
ansible/roles/pihole/handlers/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
- name: restart pihole FTL
|
||||
service:
|
||||
name: pihole-FTL
|
||||
state: restarted
|
||||
become: true
|
7
ansible/roles/pihole/tasks/main.yml
Normal file
7
ansible/roles/pihole/tasks/main.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
- name: Install internal alias config
|
||||
template:
|
||||
src: files/internal-alias.conf
|
||||
dest: /etc/dnsmasq.d/internal-alias.conf
|
||||
mode: 0644
|
||||
notify: restart pihole FTL
|
||||
become: true
|
Loading…
Reference in a new issue