diff options
Diffstat (limited to 'ipaserver/install/server/replicainstall.py')
-rw-r--r-- | ipaserver/install/server/replicainstall.py | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/ipaserver/install/server/replicainstall.py b/ipaserver/install/server/replicainstall.py index 78e32ae9b..150325b82 100644 --- a/ipaserver/install/server/replicainstall.py +++ b/ipaserver/install/server/replicainstall.py @@ -639,6 +639,16 @@ def install_check(installer): except RuntimeError as e: print(str(e)) sys.exit(1) + + if options.setup_dns: + dns.install_check(False, remote_api, True, options, + config.host_name) + config.ips = dns.ip_addresses + else: + config.ips = installutils.get_server_ip_address( + config.host_name, not installer.interactive, False, + options.ip_addresses) + except errors.ACIError: sys.exit("\nThe password provided is incorrect for LDAP server " "%s" % config.master_host_name) @@ -651,14 +661,6 @@ def install_check(installer): if conn.isconnected(): conn.disconnect() - if options.setup_dns: - dns.install_check(False, remote_api, True, options, config.host_name) - config.ips = dns.ip_addresses - else: - config.ips = installutils.get_server_ip_address( - config.host_name, not installer.interactive, False, - options.ip_addresses) - # installer needs to update hosts file when DNS subsystem will be # installed or custom addresses are used if options.setup_dns or options.ip_addresses: @@ -1162,6 +1164,15 @@ def promote_check(installer): except RuntimeError as e: print(str(e)) sys.exit(1) + + if options.setup_dns: + dns.install_check(False, remote_api, True, options, + config.host_name) + else: + config.ips = installutils.get_server_ip_address( + config.host_name, not installer.interactive, + False, options.ip_addresses) + except errors.ACIError: sys.exit("\nInsufficient privileges to promote the server.") except errors.LDAPError: @@ -1173,13 +1184,6 @@ def promote_check(installer): if conn.isconnected(): conn.disconnect() - if options.setup_dns: - dns.install_check(False, remote_api, True, options, config.host_name) - else: - config.ips = installutils.get_server_ip_address( - config.host_name, not installer.interactive, - False, options.ip_addresses) - # check connection if not options.skip_conncheck: if add_to_ipaservers: |