acsengine: fix agent extensions
@@ -1241,7 +1241,7 @@ func makeAgentExtensionScriptCommands(cs *api.ContainerService, profile *api.Age
if profile.IsAvailabilitySets() {
copyIndex = fmt.Sprintf("',copyIndex(variables('%sOffset')),'", profile.Name)
}
- return makeExtensionScriptCommands(cs.Properties.MasterProfile.PreprovisionExtension,
+ return makeExtensionScriptCommands(profile.PreprovisionExtension,
cs.Properties.ExtensionProfiles, copyIndex)
}
