1
0
mirror of https://github.com/rancher/rke.git synced 2025-05-10 09:24:32 +00:00

Deploy cloud-config file while contents are empty

This commit is contained in:
Sebastiaan van Steenis 2019-12-05 13:40:52 +01:00 committed by Alena Prokharchyk
parent 101192c1c7
commit 6b68be717a

View File

@ -36,7 +36,9 @@ func doDeployFile(ctx context.Context, host *hosts.Host, fileName, fileContents,
}
var cmd, containerEnv []string
if fileContents != "" {
// fileContents determines if a file is placed or removed
// exception to this is the cloud-config file, as it is valid being empty (for example, when only specifying the aws cloudprovider and no additional config)
if fileContents != "" || fileName == cloudConfigFileName {
containerEnv = []string{ConfigEnv + "=" + fileContents}
cmd = []string{
"sh",