summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinstall/tools/ipa-replica-prepare5
1 files changed, 3 insertions, 2 deletions
diff --git a/install/tools/ipa-replica-prepare b/install/tools/ipa-replica-prepare
index 2765e4a0e..df44934de 100755
--- a/install/tools/ipa-replica-prepare
+++ b/install/tools/ipa-replica-prepare
@@ -430,6 +430,8 @@ def main():
ip_address = str(ip)
ip_prefixlen = ip.prefixlen
+ ns_ip_address = resolve_host(api.env.host)
+
if ip.defaultnet:
revzone = ip.reverse_dns
if ip.version == 4:
@@ -448,10 +450,9 @@ def main():
if prefix > 0:
ip_prefixlen = prefix
else:
- ns_ip_address = resolve_host(api.env.host)
add_reverse_zone(ip_address, ip_prefixlen, ns_ip_address)
- zone = add_zone(domain, nsaddr=ip_address)
+ zone = add_zone(domain, nsaddr=ns_ip_address)
add_fwd_rr(zone, name, ip_address)
add_ptr_rr(ip_address, ip_prefixlen, replica_fqdn)