Update setup-kubetools.sh

Amendment of MYOS var for CentOS OS, as well as indentation for HERE document for the repo creation
This commit is contained in:
Francisco Isgleas 2021-08-20 10:23:48 +02:00 committed by GitHub
parent 9ab48fd2b7
commit 57c445b564
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,17 +16,17 @@ MYOS=$(hostnamectl | awk '/Operating/ { print $3 }')
OSVERSION=$(hostnamectl | awk '/Operating/ { print $4 }') OSVERSION=$(hostnamectl | awk '/Operating/ { print $4 }')
##### CentOS 7 config ##### CentOS 7 config
if [ $MYOS = "centos" ] if [ $MYOS = "CentOS" ]
then then
echo RUNNING CENTOS CONFIG echo RUNNING CENTOS CONFIG
cat <<EOF > /etc/yum.repos.d/kubernetes.repo cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes] [kubernetes]
name=Kubernetes name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64 baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1 enabled=1
gpgcheck=1 gpgcheck=1
repo_gpgcheck=1 repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF EOF
# Set SELinux in permissive mode (effectively disabling it) # Set SELinux in permissive mode (effectively disabling it)