Skip to content

Commit

Permalink
init ssh key only in ignition mode
Browse files Browse the repository at this point in the history
Fix #25
  • Loading branch information
vooon committed Aug 6, 2024
1 parent 068af21 commit 699cdd8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,11 @@ func (g *InstanceGroup) Init(ctx context.Context, log hclog.Logger, settings pro
return provider.ProviderInfo{}, fmt.Errorf("Only static credentials supported in Cloud-Init mode.")
}

err = g.initSSHKey(ctx, log, &settings)
if err != nil {
return provider.ProviderInfo{}, err
if g.UseIgnition {
err = g.initSSHKey(ctx, log, &settings)
if err != nil {
return provider.ProviderInfo{}, err
}
}

// log.With("creds", settings, "image", g.imgProps).Info("settings2")
Expand Down

0 comments on commit 699cdd8

Please sign in to comment.