8558a7
From d1506d6a44b4c4b85772cd0764113f2b20a147fe Mon Sep 17 00:00:00 2001
8558a7
From: Stanislav Laznicka <slaznick@redhat.com>
8558a7
Date: Fri, 6 Apr 2018 09:10:20 +0200
8558a7
Subject: [PATCH] replica-install: pass --ip-address to client install
8558a7
8558a7
In replica DL1 installation, the --ip-address option was not passed
8558a7
down to the ipa-client-install script (when not promoting client).
8558a7
This resulted in creating DNS records for all of the host's interface
8558a7
IP adresses instead of just those specified.
8558a7
8558a7
This patch passes all the --ip-address options down to the client
8558a7
installation script.
8558a7
8558a7
https://pagure.io/freeipa/issue/7405
8558a7
8558a7
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
8558a7
---
8558a7
 ipaserver/install/server/replicainstall.py | 4 ++++
8558a7
 1 file changed, 4 insertions(+)
8558a7
8558a7
diff --git a/ipaserver/install/server/replicainstall.py b/ipaserver/install/server/replicainstall.py
8558a7
index 5a37aea0ac913d5c9cb88346345ba5760a9e923d..42e4615ad2dc1f604f5d8d14f8e57e3e4674bcb9 100644
8558a7
--- a/ipaserver/install/server/replicainstall.py
8558a7
+++ b/ipaserver/install/server/replicainstall.py
8558a7
@@ -942,6 +942,10 @@ def ensure_enrolled(installer):
8558a7
         args.append("--mkhomedir")
8558a7
     if installer.force_join:
8558a7
         args.append("--force-join")
8558a7
+    if installer.ip_addresses:
8558a7
+        for ip in installer.ip_addresses:
8558a7
+            # installer.ip_addresses is of type [CheckedIPAddress]
8558a7
+            args.extend(("--ip-address", str(ip)))
8558a7
 
8558a7
     try:
8558a7
         # Call client install script
8558a7
-- 
8558a7
2.14.3
8558a7