Syncing current state.

This commit is contained in:
2021-12-19 21:32:19 -06:00
parent eb39acaa06
commit 94a4736839
20 changed files with 1599 additions and 180 deletions

34
roles/Nazara/files/dhcp Normal file
View File

@@ -0,0 +1,34 @@
dhcp-range=10.0.1.224,10.0.1.254,255.255.255.0,12h
dhcp-option=option:router,10.0.1.1
dhcp-option=option:dns-server,10.0.1.7
dhcp-range=10.0.1.1,10.0.1.223,255.255.255.0,12h
dhcp-host=B8:27:EB:B6:AA:0C,10.0.1.2
dhcp-host=B8:27:EB:B6:AA:0C,10.0.1.3
dhcp-host=B8:27:EB:B6:AA:0C,10.0.1.4
dhcp-host=B8:27:EB:B6:AA:0C,10.0.1.5
dhcp-host=B8:27:EB:B6:AA:0C,10.0.1.6
dhcp-host=B8:27:EB:B6:AA:0C,10.0.1.7
dhcp-host=00:15:5D:01:02:05,10.0.1.8
dhcp-host=00:15:5D:01:02:04,10.0.1.9
dhcp-host=00:15:5d:01:02:06,10.0.1.10
dhcp-host=00:15:5d:01:02:07,10.0.1.11
dhcp-host=00:25:90:0d:6e:86,10.0.1.12
dhcp-host=84:16:F9:14:15:C5,10.0.1.16
dhcp-host=84:16:F9:13:B6:E6,10.0.1.17
dhcp-host=00:15:5d:01:02:08,10.0.1.24
dhcp-host=00:15:5d:01:02:09,10.0.1.25
dhcp-host=aa:aa:aa:aa:aa:aa,10.0.1.32
dhcp-host=34:f6:4b:36:12:8f,10.0.1.33
dhcp-host=64:C2:DE:78:BB:40,10.0.1.34
dhcp-host=64:C2:DE:0C:AB:0D,10.0.1.35
dhcp-host=00:1F:BC:10:1C:F7,10.0.1.36
dhcp-host=2c:30:33:64:f4:03,10.0.1.1
dhcp-host=00:80:92:77:CE:E4,10.0.1.37
dhcp-host=00:25:90:0D:82:5B,10.0.1.38
dhcp-host=00:25:90:3E:C6:8C,10.0.1.39
dhcp-host=9c:a3:aa:33:a3:99,10.0.1.40
dhcp-host=64:16:66:08:57:F5,10.0.2.2
dhcp-host=18:B4:30:2F:F1:37,10.0.2.3
dhcp-host=64:52:99:14:28:2B,10.0.2.4
dhcp-host=40:9F:38:95:06:34,10.0.2.5

29
roles/Nazara/files/dns Normal file
View File

@@ -0,0 +1,29 @@
10.0.1.2 Nazara.MSN0.AniNIX.net Nazara
10.0.1.3 Node-1.MSN0.AniNIX.net Node-1
10.0.1.4 Node-2.MSN0.AniNIX.net Node-2
10.0.1.5 Node-3.MSN0.AniNIX.net Node-3
10.0.1.6 Node-4.MSN0.AniNIX.net Node-4
10.0.1.7 Node-5.MSN0.AniNIX.net Node-5
10.0.1.8 Sharingan.MSN0.AniNIX.net Sharingan
10.0.1.9 DarkNet.MSN0.AniNIX.net DarkNet
10.0.1.10 Maat.MSN0.AniNIX.net Maat
10.0.1.11 Aether.MSN0.AniNIX.net Aether
10.0.1.12 Core.MSN0.AniNIX.net Core
10.0.1.16 Geth-Hub-1.MSN0.AniNIX.net Geth-Hub-1
10.0.1.17 Geth-Hub-2.MSN0.AniNIX.net Geth-Hub-2
10.0.1.24 DedNet.MSN0.AniNIX.net DedNet
10.0.1.25 Geth.MSN0.AniNIX.net Geth
10.0.1.32 Tachikoma.MSN0.AniNIX.net Tachikoma
10.0.1.33 Dedsec.MSN0.AniNIX.net Dedsec
10.0.1.34 DarkFeather.MSN0.AniNIX.net DarkFeather
10.0.1.35 Lykos.MSN0.AniNIX.net Lykos
10.0.1.36 Games.MSN0.AniNIX.net Games
10.0.1.1 Shadowfeed.MSN0.AniNIX.net Shadowfeed
10.0.1.37 Print.MSN0.AniNIX.net Print
10.0.1.38 Core-Console.MSN0.AniNIX.net Core-Console
10.0.1.39 Maat-Console.MSN0.AniNIX.net Maat-Console
10.0.1.40 Geth-Eyes.MSN0.AniNIX.net Geth-Eyes
10.0.2.2 LinKeuei.MSN0.AniNIX.net LinKeuei
10.0.2.3 Canary.MSN0.AniNIX.net Canary
10.0.2.4 Charon.MSN0.AniNIX.net Charon
10.0.2.5 Skitarii-1.MSN0.AniNIX.net Skitarii-1

View File

@@ -1,7 +1,51 @@
---
- name: Nazara packages
- name: Clone pi-hole
become: yes
package:
name:
- pi-hole
git:
accept_newhostkey: yes
dest: /opt/pi-hole
repo: https://github.com/pi-hole/pi-hole.git
- name: Install pi-hole if needed
become: yes
command:
creates: /usr/bin/pihole-FTL
cmd: bash basic-install.sh
chdir: '/opt/pi-hole/automated install'
- name: Generate DNS/DHCP from inventory
delegate_to: localhost
run_once: true
command: "python3 ../bin/generate-pihole-dns-dhcp.py {{ inventory_file }}"
- name: Nazara DNS
become: yes
register: dns_updated
copy:
dest: /etc/pihole/custom.list
src: dns
owner: pihole
group: pihole
mode: 0644
- name: Reload dns
become: yes
command: "pihole restartdns"
when: dns_updated.changed
- name: Nazara DHCP
become: yes
register: dhcp_updated
copy:
src: dhcp
dest: /etc/dnsmasq.d/04-pihole-static-dhcp.conf
owner: root
group: root
mode: 0644
- name: Reload services
become: yes
command: pihole restartdns
when: dns_updated.changed or dhcp_updated.changed