🤖 Updated Router Config at Mon Feb 12 15:08:15 EST 2024

This commit is contained in:
Ariel Sosnovsky committed 2024-02-12 15:08:15 -05:00
1 parent ee478395ba
commit ce9c9c1a8b
4 files changed
+32 -1

No files matched your search

+9
View File
@@ -95,3 +95,12 @@ router:
mac: '94:83:C4:31:D5:CE'
- name: 'orbi-office'
mac: '34:98:B5:AC:36:67'
devices:
- name: 'fwlaptop'
mac: '14:AC:60:29:85:4D'
- name: 'sumomac'
mac: 'F8:E4:3B:36:0F:E4'
- name: 'steamdeck'
mac: '34:6F:24:CA:70:57'
- name: 'vitapc'
mac: 'E0:0A:F6:79:C6:E9'
+8
View File
@@ -24,6 +24,12 @@ ip_prefix_map = {
"iot": "10.0.14.",
"apl": "10.0.15.",
"router": "10.0.16.",
"devices": "10.0.0.",
}
defaults = {
'devices': {
'justMac': True,
}
}
def cap1_and_join(*args: str) -> str:
@@ -38,12 +44,14 @@ with CONFIG_FILE.open('r') as fp:
with DNSMASQ_CONF.open('w') as dfp, SUMMARY.open('w') as sfp, ETHERS.open('w') as efp:
for sub_domain, configs in devices.items():
default_values = defaults.get(sub_domain, {})
ip_prefix = ip_prefix_map[sub_domain]
sfp.write(f'\n{cap1_and_join(sub_domain)}:')
efp.write(f'#{cap1_and_join(sub_domain)}\n')
ip_suffix = 0
for dvc in configs:
ip_suffix += 1
dvc = {**default_values, **dvc}
mac = dvc['mac']
name = dvc['name']
sfp.write(f'\n {cap1_and_join(name)}:')
+5
View File
@@ -77,3 +77,8 @@ D8:BE:65:F2:ED:18 amzn-bedroom.apl.internal
94:83:C4:31:D5:CE gl-basement.router.internal
34:98:B5:AC:36:67 10.0.16.2
34:98:B5:AC:36:67 orbi-office.router.internal
#Devices
14:AC:60:29:85:4D fwlaptop.devices.internal
F8:E4:3B:36:0F:E4 sumomac.devices.internal
34:6F:24:CA:70:57 steamdeck.devices.internal
E0:0A:F6:79:C6:E9 vitapc.devices.internal
+10 -1
View File
@@ -120,4 +120,13 @@ Router:
host: "gl-basement.router.internal"
Orbi-office:
ip: "10.0.16.2"
host: "orbi-office.router.internal"
host: "orbi-office.router.internal"
Devices:
Fwlaptop:
host: "fwlaptop.devices.internal"
Sumomac:
host: "sumomac.devices.internal"
Steamdeck:
host: "steamdeck.devices.internal"
Vitapc:
host: "vitapc.devices.internal"