make deprovisionK3sInfra idempotent
This commit is contained in:
parent
bcc89ef408
commit
2bb986f80f
1 changed files with 5 additions and 1 deletions
|
@ -52,7 +52,11 @@ fun Prov.deprovisionK3sInfra() = task {
|
||||||
deleteFile(certManagerDeployment.path, sudo = true)
|
deleteFile(certManagerDeployment.path, sudo = true)
|
||||||
deleteFile(certManagerIssuer.path, sudo = true)
|
deleteFile(certManagerIssuer.path, sudo = true)
|
||||||
deleteFile(k3sKubeConfig.path, sudo = true)
|
deleteFile(k3sKubeConfig.path, sudo = true)
|
||||||
cmd("k3s-uninstall.sh")
|
|
||||||
|
val k3sUninstallScript = "k3s-uninstall.sh"
|
||||||
|
if (chk("which $k3sUninstallScript")) {
|
||||||
|
cmd(k3sUninstallScript)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue