diff dns.py @ 65:49a69852a4f4

let's get in less trouble by using dhcp more universally
author drewp@bigasterisk.com
date Wed, 04 May 2022 23:37:27 -0700
parents b46df76991b6
children 136d86d06ce6
line wrap: on
line diff
--- a/dns.py	Wed May 04 23:36:13 2022 -0700
+++ b/dns.py	Wed May 04 23:37:27 2022 -0700
@@ -23,7 +23,7 @@
     dhcp_hosts = tempfile.NamedTemporaryFile(mode='wt', encoding='ascii')
     dhcp_hosts.write("# written by pyinfra\n\n")
     for row in lanscape_config['dhcp_table']:
-        dhcp_hosts.write(f'{row["mac"]},{row["hostname"]},{row["ip"]},infinite\n')
+        dhcp_hosts.write(f'{row["mac"]},{row["hostname"]},{row["ip"]},24h\n')
     dhcp_hosts.flush()
     return dhcp_hosts