mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-12 20:57:20 +00:00
Merge pull request #23121 from deromka/master
Automatic merge from submit-queue Added vsphere support for vagrant Since the native vsphere support (using govc library) requires admin permissions on ESX/vCenter, not everyone can have such permissions. So I'm adding a vsphere support using vagrant using vagrant-vsphere plugin
This commit is contained in:
@@ -21,6 +21,7 @@ set -o pipefail
|
||||
# Set the host name explicitly
|
||||
# See: https://github.com/mitchellh/vagrant/issues/2430
|
||||
hostnamectl set-hostname ${NODE_NAME}
|
||||
if_to_edit=""
|
||||
|
||||
if [[ "$(grep 'VERSION_ID' /etc/os-release)" =~ ^VERSION_ID=23 ]]; then
|
||||
# Disable network interface being managed by Network Manager (needed for Fedora 21+)
|
||||
@@ -33,7 +34,13 @@ if [[ "$(grep 'VERSION_ID' /etc/os-release)" =~ ^VERSION_ID=23 ]]; then
|
||||
systemctl restart network
|
||||
fi
|
||||
|
||||
# needed for vsphere support
|
||||
# handle the case when no 'VAGRANT-BEGIN' comment was defined in network-scripts
|
||||
# set the NETWORK_IF_NAME to have a default value in such case
|
||||
NETWORK_IF_NAME=`echo ${if_to_edit} | awk -F- '{ print $3 }'`
|
||||
if [[ -z "$NETWORK_IF_NAME" ]]; then
|
||||
NETWORK_IF_NAME=${DEFAULT_NETWORK_IF_NAME}
|
||||
fi
|
||||
|
||||
# Setup hosts file to support ping by hostname to master
|
||||
if [ ! "$(cat /etc/hosts | grep $MASTER_NAME)" ]; then
|
||||
|
Reference in New Issue
Block a user