automate configuration of local dns
This commit is contained in:
parent
4f90405092
commit
d47ec04465
|
@ -22,9 +22,7 @@ haproxy:
|
||||||
- ci.badjware.dev
|
- ci.badjware.dev
|
||||||
- grafana.badjware.dev
|
- grafana.badjware.dev
|
||||||
- jellyfin.badjware.dev
|
- jellyfin.badjware.dev
|
||||||
- actual.badjware.dev
|
|
||||||
- chat.badjware.dev
|
- chat.badjware.dev
|
||||||
- tavern.badjware.dev
|
|
||||||
backend:
|
backend:
|
||||||
- server: 192.168.20.20:8443
|
- server: 192.168.20.20:8443
|
||||||
- server: 192.168.20.21:8443
|
- server: 192.168.20.21:8443
|
||||||
|
@ -46,6 +44,9 @@ haproxy:
|
||||||
- traefik.badjware.dev
|
- traefik.badjware.dev
|
||||||
- prometheus.badjware.dev
|
- prometheus.badjware.dev
|
||||||
- deluge.badjware.dev
|
- deluge.badjware.dev
|
||||||
|
- ollama.badjware.dev
|
||||||
|
- tavern.badjware.dev
|
||||||
|
- actual.badjware.dev
|
||||||
backend:
|
backend:
|
||||||
- server: 192.168.20.20:8443
|
- server: 192.168.20.20:8443
|
||||||
- server: 192.168.20.21:8443
|
- server: 192.168.20.21:8443
|
||||||
|
|
25
hosts
25
hosts
|
@ -10,6 +10,10 @@ all:
|
||||||
truenas:
|
truenas:
|
||||||
ansible_host: 192.168.20.30
|
ansible_host: 192.168.20.30
|
||||||
children:
|
children:
|
||||||
|
pihole:
|
||||||
|
hosts:
|
||||||
|
pihole:
|
||||||
|
ansible_host: 192.168.20.2
|
||||||
proxmox:
|
proxmox:
|
||||||
hosts:
|
hosts:
|
||||||
router-0:
|
router-0:
|
||||||
|
@ -38,15 +42,15 @@ all:
|
||||||
# - 192.168.20.30:/mnt/pool0/media/Movies
|
# - 192.168.20.30:/mnt/pool0/media/Movies
|
||||||
# - 192.168.20.30:/mnt/pool0/media/Series
|
# - 192.168.20.30:/mnt/pool0/media/Series
|
||||||
minecraft-server:
|
minecraft-server:
|
||||||
hosts:
|
# hosts:
|
||||||
minecraft-server:
|
# minecraft-server:
|
||||||
ansible_host: 192.168.20.32
|
# ansible_host: 192.168.20.32
|
||||||
mc_server_jar: https://piston-data.mojang.com/v1/objects/5b868151bd02b41319f54c8d4061b8cae84e665c/server.jar
|
# mc_server_jar: https://piston-data.mojang.com/v1/objects/5b868151bd02b41319f54c8d4061b8cae84e665c/server.jar
|
||||||
mc_server_memory: 3500M
|
# mc_server_memory: 3500M
|
||||||
mc_server_ops:
|
# mc_server_ops:
|
||||||
- uuid: 649a9370-5cad-4553-93c8-cf0af25208dd
|
# - uuid: 649a9370-5cad-4553-93c8-cf0af25208dd
|
||||||
name: jirost
|
# name: jirost
|
||||||
level: 4
|
# level: 4
|
||||||
home-assistant:
|
home-assistant:
|
||||||
# hosts:
|
# hosts:
|
||||||
# home-assistant:
|
# home-assistant:
|
||||||
|
@ -91,8 +95,6 @@ all:
|
||||||
hosts:
|
hosts:
|
||||||
ubiquiti:
|
ubiquiti:
|
||||||
ansible_host: 192.168.10.2
|
ansible_host: 192.168.10.2
|
||||||
pihole:
|
|
||||||
ansible_host: 192.168.20.2
|
|
||||||
children:
|
children:
|
||||||
proxmox:
|
proxmox:
|
||||||
bastion:
|
bastion:
|
||||||
|
@ -102,6 +104,7 @@ all:
|
||||||
home-assistant:
|
home-assistant:
|
||||||
cups:
|
cups:
|
||||||
usbip:
|
usbip:
|
||||||
|
pihole:
|
||||||
vars:
|
vars:
|
||||||
ansible_user: ansible
|
ansible_user: ansible
|
||||||
ansible_password: !vault |
|
ansible_password: !vault |
|
||||||
|
|
|
@ -19,6 +19,10 @@
|
||||||
- bastion
|
- bastion
|
||||||
- wireguard
|
- wireguard
|
||||||
|
|
||||||
|
- hosts: pihole
|
||||||
|
roles:
|
||||||
|
- pihole-local-dns-records
|
||||||
|
|
||||||
- hosts: plex
|
- hosts: plex
|
||||||
roles:
|
roles:
|
||||||
- plex
|
- plex
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
- name: Install pihole local dns records
|
||||||
|
template:
|
||||||
|
src: custom.list
|
||||||
|
dest: /etc/pihole/custom.list
|
|
@ -0,0 +1,5 @@
|
||||||
|
{% for config in haproxy.routing.https %}
|
||||||
|
{% for hostname in config.frontend %}
|
||||||
|
{{ hostvars['bastion'].ansible_host }} {{ hostname }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
Loading…
Reference in New Issue