mirror of
https://github.com/rancher/rke.git
synced 2025-08-18 06:47:13 +00:00
Deploy cloud-config file while contents are empty
This commit is contained in:
parent
101192c1c7
commit
6b68be717a
@ -36,7 +36,9 @@ func doDeployFile(ctx context.Context, host *hosts.Host, fileName, fileContents,
|
|||||||
}
|
}
|
||||||
var cmd, containerEnv []string
|
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}
|
containerEnv = []string{ConfigEnv + "=" + fileContents}
|
||||||
cmd = []string{
|
cmd = []string{
|
||||||
"sh",
|
"sh",
|
||||||
|
Loading…
Reference in New Issue
Block a user