summaryrefslogtreecommitdiffstats
path: root/kud/hosting_providers/baremetal/aio.sh
diff options
context:
space:
mode:
authorSamuli Silvius <s.silvius@partner.samsung.com>2019-05-13 10:05:46 +0300
committerSamuli Silvius <s.silvius@partner.samsung.com>2019-06-10 09:17:32 +0300
commit8f5b4cdbe151b509fc1309e1bc4fc19b4bc5950c (patch)
tree4efca8e84025ef68222256d63c9fc3062014cfb4 /kud/hosting_providers/baremetal/aio.sh
parentf30199f018ae167df804c23079eb4bcec6c10f34 (diff)
Make ovn-central network interface configurable
installer.sh script is configuring ovn-central address <ip>:<port> to environment variable. Ip address is detected from the ovn-central host through ansible by grepping ifconfig output, but in this step detected network interface is hard-coded in the code to be "eth1". This commit makes network interface configurable in aio/vagrant deployment. Issue-ID: MULTICLOUD-621 Change-Id: Icbe22ffdcb45c5f16067ea609eec76fb70c0ea78 Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
Diffstat (limited to 'kud/hosting_providers/baremetal/aio.sh')
-rwxr-xr-xkud/hosting_providers/baremetal/aio.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/kud/hosting_providers/baremetal/aio.sh b/kud/hosting_providers/baremetal/aio.sh
index 416a1fef..c9903cd3 100755
--- a/kud/hosting_providers/baremetal/aio.sh
+++ b/kud/hosting_providers/baremetal/aio.sh
@@ -15,9 +15,13 @@ set -o pipefail
aio_dir=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)
cd ${aio_dir}/../vagrant
+# For aio inventory by default get ovn central ip from local host default interface.
+# This variable used only in this file, but env variable defined to enable user to override it prior calling aio.sh.
+OVN_CENTRAL_IP_ADDRESS=${OVN_CENTRAL_IP_ADDRESS:-$(hostname -I | cut -d ' ' -f 1)}
+
cat <<EOL > inventory/hosts.ini
[all]
-localhost
+localhost ansible_ssh_host=${OVN_CENTRAL_IP_ADDRESS} ansible_ssh_port=22
[kube-master]
localhost