Skip to content

Commit

Permalink
Fix wrong destination path for Nginx config file (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi committed Mar 19, 2024
1 parent 50b5319 commit 4bbc1cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions provisioner/kong-api-gateway/provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ func (p *Provisioner) Provision(ctx context.Context, ui packersdk.Ui, communicat
return err
}
nginxConfig = ""
err = p.ProvisionUpload(ui, communicator, file.Name(), "/home/ubuntu/nginx-ssl.conf")
nginxDst := fmt.Sprintf(filepath.Join(p.config.HomeDir, "nginx-ssl.conf"))
err = p.ProvisionUpload(ui, communicator, file.Name(), nginxDst)
if err != nil {
return fmt.Errorf("error uploading '%s' to '%s': %s", file.Name(), "/home/ubuntu/nginx-ssl.conf", err)
return fmt.Errorf("error uploading '%s' to '%s': %s", file.Name(), nginxDst, err)
}
for _, command := range getCommands(p.config.HomeDir) {
err := (&packersdk.RemoteCmd{Command: command}).RunWithUi(ctx, communicator, ui)
Expand Down

0 comments on commit 4bbc1cf

Please sign in to comment.