From 52e5ef81a523f95fce9bd4c7ca87c0ca6b8ba8bf Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mar 27 2019 14:09:30 +0000 Subject: replica install: acknowledge ca_host override Fixup for commit c0fd5e39c726ef4dc12e87a2f9c08ebb32ed27fe. Only set ca_host to source master hostname if ca_host points to the local host. This permits users to override ca_host in /etc/ipa/default.conf when installing a replica. Related: https://pagure.io/freeipa/issue/7744 Signed-off-by: Christian Heimes Reviewed-By: Alexander Bokovoy Reviewed-By: Tibor Dudlak --- diff --git a/ipaserver/install/server/replicainstall.py b/ipaserver/install/server/replicainstall.py index 35f443a..cbb1eb1 100644 --- a/ipaserver/install/server/replicainstall.py +++ b/ipaserver/install/server/replicainstall.py @@ -816,8 +816,12 @@ def promote_check(installer): config.host_name = api.env.host config.domain_name = api.env.domain config.master_host_name = api.env.server - # Try to use same master for CA install - config.ca_host_name = api.env.server + if not api.env.ca_host or api.env.ca_host == api.env.host: + # ca_host has not been configured explicitly, prefer source master + config.ca_host_name = api.env.server + else: + # default to ca_host from IPA config + config.ca_host_name = api.env.ca_host config.kra_host_name = config.ca_host_name config.ca_ds_port = 389 config.setup_ca = options.setup_ca