cloudstack: check that template was created

This commit is contained in:
Matthew Hooker 2017-09-26 13:36:53 -07:00
parent 875cccfb44
commit b42c916f9a
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
1 changed files with 5 additions and 0 deletions

View File

@ -102,6 +102,11 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
return nil, rawErr.(error)
}
// If there was no template created, just return
if _, ok := state.GetOk("template"); !ok {
return nil, nil
}
// Build the artifact and return it
artifact := &Artifact{
client: client,