Commit 03d7a7f6 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

builder/digitalocean: Adhere to new interface, make default in Packer

@pearkes: I added "digital-ocean" to the default config since it will
be shipping with Packer. :)
parent a76a9e86
......@@ -42,9 +42,12 @@ type Builder struct {
runner multistep.Runner
}
func (b *Builder) Prepare(raw interface{}) error {
if err := mapstructure.Decode(raw, &b.config); err != nil {
return err
func (b *Builder) Prepare(raws ...interface{}) error {
for _, raw := range raws {
err := mapstructure.Decode(raw, &b.config)
if err != nil {
return err
}
}
// Optional configuration with defaults
......
......@@ -18,6 +18,7 @@ const defaultConfig = `
"builders": {
"amazon-ebs": "packer-builder-amazon-ebs",
"digital-ocean": "packer-builder-digital-ocean",
"virtualbox": "packer-builder-virtualbox",
"vmware": "packer-builder-vmware"
},
......
......@@ -2,7 +2,7 @@ package main
import (
"github.com/mitchellh/packer/packer/plugin"
"github.com/pearkes/packer/builder/digitalocean"
"github.com/mitchellh/packer/builder/digitalocean"
)
func main() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment