script cleanup

This commit is contained in:
John Bowdre 2022-12-05 09:54:41 -06:00
parent c9e016586d
commit 82e5e61064
2 changed files with 1 additions and 8 deletions

View file

@ -23,13 +23,6 @@ sudo sh -c 'if [ -f /etc/udev/rules.d/70-persistent-net.rules ]; then
rm /etc/udev/rules.d/70-persistent-net.rules rm /etc/udev/rules.d/70-persistent-net.rules
fi' fi'
# check for only RHEL releases
if [[ $(awk -F= '/^ID=/{print $2}' /etc/os-release | grep rhel) ]]; then
echo '>> Clearing RHSM subscription...'
sudo subscription-manager unregister
sudo subscription-manager clean
fi
echo '>> Clearing temp dirs...' echo '>> Clearing temp dirs...'
sudo rm -rf /tmp/* sudo rm -rf /tmp/*
sudo rm -rf /var/tmp/* sudo rm -rf /var/tmp/*

View file

@ -39,5 +39,5 @@ sudo swapoff -a
echo ".. install kubernetes version ${KUBEVERSION}" echo ".. install kubernetes version ${KUBEVERSION}"
sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update && sudo apt-get install -y kubelet=${KUBEVERSION}-00 kubeadm=${KUBEVERSION}-00 kubectl=${KUBEVERSION}-00 sudo apt-get update && sudo apt-get install -y kubelet="${KUBEVERSION}"-00 kubeadm="${KUBEVERSION}"-00 kubectl="${KUBEVERSION}"-00
sudo apt-mark hold kubelet kubeadm kubectl sudo apt-mark hold kubelet kubeadm kubectl