fix kubernetes bash completion

This commit is contained in:
az 2022-03-28 19:21:46 +02:00
parent 1135312c7b
commit db33edf0f7

View file

@ -48,9 +48,8 @@ fun Prov.installKubectlAndTools(): ProvResult = task {
cmd("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") cmd("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")
// kubectl and bash completion // kubectl and bash completion
cmd("sudo apt-get update")
aptInstall("kubectl") aptInstall("kubectl")
addTextToFile("\nkubectl completion bash\n", "/etc/bash_completion.d/kubernetes", sudo = true) cmd("kubectl completion bash >> /etc/bash_completion.d/kubernetes", sudo = true)
createDir(".bashrc.d") createDir(".bashrc.d")
createFileFromResource(kubeConfigFile, "kubectl.sh", resourcePath) createFileFromResource(kubeConfigFile, "kubectl.sh", resourcePath)
} else { } else {