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