diff --git a/builder/digitalocean/builder.go b/builder/digitalocean/builder.go index 49dfe2422..f8fd3edb6 100644 --- a/builder/digitalocean/builder.go +++ b/builder/digitalocean/builder.go @@ -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 diff --git a/config.go b/config.go index efe088d53..5e87484cf 100644 --- a/config.go +++ b/config.go @@ -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" }, diff --git a/plugin/builder-digital-ocean/main.go b/plugin/builder-digital-ocean/main.go index 28dcb9726..7746979c2 100644 --- a/plugin/builder-digital-ocean/main.go +++ b/plugin/builder-digital-ocean/main.go @@ -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() {