if err != nil {
return fmt.Errorf("baremetalAutomatedDeployment: PrepareAutomation: error unmarshalling site-config.yaml: %s", err)
}
+ rhcosVersionsPath := fmt.Sprintf("%s/common.sh", automationDestination)
if config, ok := siteConfig["config"].(map[interface{}]interface{}); ok {
if releaseImageOverride, ok := config["releaseImageOverride"].(string); ok {
parts := strings.Split(releaseImageOverride, ":")
if len(parts) == 2 {
- rhcosVersionsPath := fmt.Sprintf("%s/common.sh", automationDestination)
-
err = utils.ReplaceFileText(rhcosVersionsPath, "OPENSHIFT_RHCOS_MAJOR_REL=\"\"", fmt.Sprintf("OPENSHIFT_RHCOS_MAJOR_REL=\"%s\"", parts[1]))
if err != nil {
}
}
}
+
+ if virtualizedInstall, ok := config["virtualizedInstall"].(string); ok {
+
+ err = utils.ReplaceFileText(rhcosVersionsPath, "VIRTUALIZED_INSTALL=false", fmt.Sprintf("VIRTUALIZED_INSTALL=%s", virtualizedInstall))
+
+ if err != nil {
+ return fmt.Errorf("baremetalAutomatedDeployment: PrepareAutomation: error injecting virtualized install setting: %s", err)
+ }
+ }
}
log.Printf("baremetalAutomatedDeployment: PrepareAutomation: finished injecting version selections into automation repo\n")