From 1b3cabb03524bd856cc619f3113b6d08d665af1c Mon Sep 17 00:00:00 2001 From: Jonathan Boulle Date: Tue, 1 Jul 2014 12:08:42 -0700 Subject: [PATCH] coreos-cloudinit: apply environment to userdata string --- coreos-cloudinit.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/coreos-cloudinit.go b/coreos-cloudinit.go index 5fe442b..b8e96b3 100644 --- a/coreos-cloudinit.go +++ b/coreos-cloudinit.go @@ -112,7 +112,9 @@ func main() { } } + // Apply environment to user-data env := initialize.NewEnvironment("/", ds.ConfigRoot(), workspace, convertNetconf, sshKeyName, subs) + userdata := env.Apply(string(userdataBytes)) var ccm, ccu *initialize.CloudConfig var script *system.Script @@ -120,7 +122,7 @@ func main() { fmt.Printf("Failed to parse meta-data: %v\n", err) die() } - if ud, err := initialize.ParseUserData(string(userdataBytes)); err != nil { + if ud, err := initialize.ParseUserData(userdata); err != nil { fmt.Printf("Failed to parse user-data: %v\n", err) die() } else {