Pass the host-id to the install command
@@ -450,7 +450,7 @@ func (b *bareMetalInventory) addInstallCommand(ctx context.Context, masterNodesI
bootstrapId := masterNodesIds[len(masterNodesIds)-1]
log.Debugf("Bootstrap ID is %s", bootstrapId)
- const cmdTmpl = `sudo podman run -v /dev:/dev:rw -v /opt:/opt:rw --privileged --pid=host {{.INSTALLER}} --role {{.ROLE}} --cluster-id {{.CLUSTER_ID}} --host {{.HOST}} --port {{.PORT}} --boot-device {{.BOOT_DEVICE}}`
+ const cmdTmpl = `sudo podman run -v /dev:/dev:rw -v /opt:/opt:rw --privileged --pid=host {{.INSTALLER}} --role {{.ROLE}} --cluster-id {{.CLUSTER_ID}} --host {{.HOST}} --port {{.PORT}} --boot-device {{.BOOT_DEVICE}} --host-id {{.HOST_ID}}`
t, err := template.New("cmd").Parse(cmdTmpl)
if err != nil {
@@ -477,6 +477,7 @@ func (b *bareMetalInventory) addInstallCommand(ctx context.Context, masterNodesI
return err
}
data["BOOT_DEVICE"] = fmt.Sprintf("/dev/%s", disks[0].Name)
+ data["HOST_ID"] = string(*cluster.Hosts[i].ID)
buf := &bytes.Buffer{}
if err := t.Execute(buf, data); err != nil {
return err
