aboutsummaryrefslogtreecommitdiffstats
path: root/ci/scripts/freeipa_setup.sh
diff options
context:
space:
mode:
authorJuan Antonio Osorio Robles <jaosorior@redhat.com>2017-01-16 19:39:17 +0200
committerJuan Antonio Osorio Robles <jaosorior@redhat.com>2017-01-18 20:51:20 +0200
commit78215fae79fa7152012c116287cda9f9b2afa125 (patch)
treed5d7b8787dc8079901821fe34b6ec6f75e704c53 /ci/scripts/freeipa_setup.sh
parent5bea89cc5d10ce6245c680a2b10aeb5ff7b0996b (diff)
Add IP to provisioning interface for FreeIPA if requested
If a variable is set in the environment, one can assign an IP for the provisioning interface for FreeIPA, this is set by OVB and it doesn't use DHCP, so it's needed since we want the overcloud nodes to communicate with the CA. bp tls-via-certmonger Change-Id: I44a8135118b047f154e3edbb8846751bd2e16c84
Diffstat (limited to 'ci/scripts/freeipa_setup.sh')
-rw-r--r--ci/scripts/freeipa_setup.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/ci/scripts/freeipa_setup.sh b/ci/scripts/freeipa_setup.sh
index 6906a2dd..c072c744 100644
--- a/ci/scripts/freeipa_setup.sh
+++ b/ci/scripts/freeipa_setup.sh
@@ -8,6 +8,8 @@
# - AdminPassword
# - UndercloudFQDN
# - HostsSecret
+# - ProvisioningCIDR: If set, it adds the given CIDR or IP to the
+# provisioning interface (which is hardcoded to eth1)
#
set -eux
@@ -17,6 +19,12 @@ elif [ -f "/tmp/freeipa-setup.env" ]; then
source /tmp/freeipa-setup.env
fi
+if [ -n "$ProvisioningCIDR" ]; then
+ # Add address to provisioning network interface
+ ip link set dev eth1 up
+ ip addr add $ProvisioningCIDR dev eth1
+fi
+
# Set DNS servers
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
echo "nameserver 8.8.4.4" >> /etc/resolv.conf