Skip to content

Commit

Permalink
fix var name
Browse files Browse the repository at this point in the history
  • Loading branch information
jarededwards committed Dec 12, 2024
1 parent bd43e93 commit 5e77a60
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/reboot.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func getRebootCommand() *cobra.Command {
return fmt.Errorf("error parsing template: %w", err)
}

var outputBuffer2 bytes.Buffer
var outputBuffer bytes.Buffer

ip, err := k8sClient.GetHardwareMachineRefFromSecretLabel(ctx, constants.ColonyNamespace, metav1.ListOptions{
LabelSelector: fmt.Sprintf("colony.konstruct.io/hardware-id=%s", hardwareID),
Expand All @@ -71,7 +71,7 @@ func getRebootCommand() *cobra.Command {
return fmt.Errorf("error getting machine ref: %w", err)
}

err = tmpl.Execute(&outputBuffer2, RufioPowerCycleRequest{
err = tmpl.Execute(&outputBuffer, RufioPowerCycleRequest{
IP: ip,
EFIBoot: efiBoot,
BootDevice: bootDevice,
Expand All @@ -81,9 +81,9 @@ func getRebootCommand() *cobra.Command {
return fmt.Errorf("error executing template: %w", err)
}

log.Info(outputBuffer2.String())
log.Info(outputBuffer.String())

if err := k8sClient.ApplyManifests(ctx, []string{outputBuffer2.String()}); err != nil {
if err := k8sClient.ApplyManifests(ctx, []string{outputBuffer.String()}); err != nil {
return fmt.Errorf("error applying rufiojob: %w", err)
}

Expand Down

0 comments on commit 5e77a60

Please sign in to comment.