Skip to content

Commit

Permalink
Merge pull request #50 from luthermonson/cloud-config-logic
Browse files Browse the repository at this point in the history
dropping iso gating logic
  • Loading branch information
dramich authored Nov 14, 2019
2 parents b59f376 + 9fee6de commit c056b89
Showing 1 changed file with 11 additions and 18 deletions.
29 changes: 11 additions & 18 deletions drivers/vmwarevsphere/cloudinit.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,21 @@ func (d *Driver) cloudInit(vm *object.VirtualMachine) error {
return d.cloudInitGuestInfo(vm)
}

if d.CloudConfig == "" {
if err := d.createCloudInitIso(); err != nil {
return err
}

ds, err := d.getVmDatastore(vm)
if err != nil {
return err
}
if err := d.createCloudInitIso(); err != nil {
return err
}

err = d.uploadCloudInitIso(vm, d.datacenter, ds)
if err != nil {
return err
}
ds, err := d.getVmDatastore(vm)
if err != nil {
return err
}

err = d.mountCloudInitIso(vm, d.datacenter, ds)
if err != nil {
return err
}
err = d.uploadCloudInitIso(vm, d.datacenter, ds)
if err != nil {
return err
}

return nil
return d.mountCloudInitIso(vm, d.datacenter, ds)
}

func (d *Driver) cloudInitGuestInfo(vm *object.VirtualMachine) error {
Expand Down

0 comments on commit c056b89

Please sign in to comment.