leonidlm / packer-builder-softlayer

A builder plugin for packer.io for a SoftLayer cloud
MIT License
38 stars 32 forks source link

Template path should be set dynamically #3

Closed jonyen closed 9 years ago

jonyen commented 10 years ago

Continuing on issue from https://github.com/mitchellh/packer/issues/1417

I am a little bit new to Go and not sure exactly how the structure should be, but it appears that lines 149, 180, and 222, which are pointing to json template files need to include the "src/github.com/leonidlm/packer-builder-softlayer" as part of the template path. I hard-coded it in as a workaround to my previous issue, but I don't know how my directory is meant to be structured otherwise or if I'm doing something else that's wrong. Thanks!

leonidlm commented 10 years ago

@jonyen thank you for reporting this bug. The issues is in how I am constructing the path to the templates folder.

As you can see in line 58 I am using the os.Getwd() method, which will return the folder the program was run from. If you will run packer from within the packer-builder-softlayer folder, the current code should run.

I will soon submit a patch to fix this bug. I will be glad if you will be able to test it in your setup, just to make sure that it fixes this behaviour.

jonyen commented 10 years ago

Thanks, I'd be happy to test it!

konsti commented 10 years ago

any progress on this?

leonidlm commented 10 years ago

@konsti yes, I hope to push the fix soon.

leonidlm commented 10 years ago

@konsti @jonyen - I fixed the issues with the local template files. Can you please check that it works for you as expected? You don't need the source code now, the binary should be enought for everything to work properly

jonyen commented 9 years ago

@leonidlm Tested and verified that this works for me now. Thanks!