Mercurial > code > home > repos > infra
diff dns.py @ 320:11d3bcedb9f0
updates for tofu rebuild; some dead code; start moving tasks into subdirs with their files and templates
author | drewp@bigasterisk.com |
---|---|
date | Fri, 08 Nov 2024 23:16:56 -0800 |
parents | 2e6dbebb2cb3 |
children | 4d1b6a6e65d2 |
line wrap: on
line diff
--- a/dns.py Wed Oct 16 20:47:19 2024 -0700 +++ b/dns.py Fri Nov 08 23:16:56 2024 -0800 @@ -60,11 +60,6 @@ systemd.service(service='dnsmasq', enabled=False, running=False) if host.name == 'bang': - files.directory(path='/opt/dnsmasq') - - dnsmasq_instance('10.5', house_iface='unused', dhcp_range='unused', - listen_address='unused') # only works after wireguard is up -# move out of this file- it's not dns def watchLeasesFile(): """summary: @@ -75,7 +70,8 @@ """ dhcp_graph_url = "http://10.5.0.7:8005" leases = "/opt/dnsmasq/10.2/leases" - files.put(dest='/etc/systemd/system/dhcp_graph_watch.path', src=StringIO(f''' + files.put(dest='/etc/systemd/system/dhcp_graph_watch.path', + src=StringIO(f''' [Unit] Description=dhcp leases file changed- run dhcp_graph_update After=localfs.target @@ -88,7 +84,8 @@ WantedBy=multi-user.target ''')) - files.put(dest='/etc/systemd/system/dhcp_graph_update.service', src=StringIO(f''' + files.put(dest='/etc/systemd/system/dhcp_graph_update.service', + src=StringIO(f''' [Unit] Description=Send new dhcp leases content to dhcp_graph After=network.target @@ -103,6 +100,7 @@ systemd.service(service='dhcp_graph_watch.path', enabled=True, restarted=True, daemon_reload=True) systemd.service(service='dhcp_graph_update.service', enabled=True, restarted=True, daemon_reload=True) + if host.name == 'pipe': rpi_net_boot() files.directory(path='/opt/dnsmasq')