abs names
This commit is contained in:
parent
be5a6fde60
commit
9fa0dc0653
@ -124,16 +124,16 @@ def main() -> int:
|
||||
host = metadata.host
|
||||
if metadata.namespace:
|
||||
host = f"{host}.{metadata.namespace}"
|
||||
host = f"{host}.{args.zone}."
|
||||
host = f"{host}.{args.zone}"
|
||||
|
||||
# Add forward and reverse records
|
||||
for address in addresses:
|
||||
if isinstance(address, ipaddress.IPv4Address):
|
||||
print(f"{host} IN A {address}")
|
||||
print(f"{address.reverse_pointer} IN PTR {host}")
|
||||
print(f"{host}. IN A {address}.")
|
||||
print(f"{address.reverse_pointer}. IN PTR {host}.")
|
||||
elif isinstance(address, ipaddress.IPv6Address):
|
||||
print(f"{host} IN AAAA {address}")
|
||||
print(f"{address.reverse_pointer} IN PTR {host}")
|
||||
print(f"{host}. IN AAAA {address}.")
|
||||
print(f"{address.reverse_pointer}. IN PTR {host}.")
|
||||
|
||||
|
||||
return 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user