fix missing ProvResult

This commit is contained in:
az 2021-09-15 19:31:57 +02:00
parent eb0547b51d
commit b8ebbbdcfb

View file

@ -3,8 +3,8 @@ package org.domaindrivenarchitecture.provs.workplace.infrastructure
import org.domaindrivenarchitecture.provs.core.Prov import org.domaindrivenarchitecture.provs.core.Prov
import org.domaindrivenarchitecture.provs.core.ProvResult import org.domaindrivenarchitecture.provs.core.ProvResult
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createDirs import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createDirs
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.dirExists
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createFile import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.createFile
import org.domaindrivenarchitecture.provs.ubuntu.filesystem.base.dirExists
fun Prov.installDevOps() = def { fun Prov.installDevOps() = def {
@ -33,6 +33,8 @@ fun Prov.installAwsCredentials(id:String, key:String): ProvResult = def {
createDirs(dir) createDirs(dir)
createFile("~/.aws/config", awsConfig()) createFile("~/.aws/config", awsConfig())
createFile("~/.aws/credentials", awsCredentials(id, key)) createFile("~/.aws/credentials", awsCredentials(id, key))
} else {
ProvResult(true, "aws credential file already installed")
} }
} }
@ -50,4 +52,4 @@ fun awsCredentials(id:String, key:String): String {
aws_access_key_id = $id aws_access_key_id = $id
aws_secret_access_key = $key aws_secret_access_key = $key
""".trimIndent() """.trimIndent()
} }