[skip ci] reformat & remove code

This commit is contained in:
ansgarz 2023-08-17 21:20:34 +02:00
parent eff4836d08
commit 2071128371
3 changed files with 5 additions and 18 deletions

View file

@ -7,7 +7,10 @@ package org.domaindrivenarchitecture.provs.desktop.domain
*/
typealias HostKey = String
open class KnownHost protected constructor(val hostName: String, val hostKeys: List<HostKey>) {
open class KnownHost protected constructor(
val hostName: String,
val hostKeys: List<HostKey>
) {
companion object {
val GITHUB = KnownHost(
"github.com", listOf(

View file

@ -6,8 +6,6 @@ import org.domaindrivenarchitecture.provs.framework.ubuntu.keys.base.addKnownHos
fun Prov.addKnownHosts(knownHosts: List<KnownHost> = KnownHost.values()) = task {
for (knownHost in knownHosts) {
with(knownHost) {
addKnownHost(hostName, hostKeys, verifyKeys = true)
}
addKnownHost(knownHost.hostName, knownHost.hostKeys, verifyKeys = true)
}
}

View file

@ -15,10 +15,6 @@ fun Prov.installDevOps() = task {
installTerraform()
installKubectlAndTools()
installYq()
// TODO: the can be removed
installAwsCredentials()
// TODO: the can be removed
installDevOpsFolder()
}
@ -169,13 +165,3 @@ fun awsCredentials(id: String, key: String): String {
aws_secret_access_key = $key
""".trimIndent()
}
fun Prov.installDevOpsFolder(): ProvResult = task {
val dir = "~/.devops/"
if (!checkDir(dir)) {
createDirs(dir)
}
}