2017-03-03 03:56:17 -05:00
|
|
|
package ecs
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
2017-04-17 09:04:52 -04:00
|
|
|
"github.com/hashicorp/packer/packer"
|
2017-03-03 03:56:17 -05:00
|
|
|
"github.com/mitchellh/multistep"
|
|
|
|
)
|
|
|
|
|
|
|
|
func message(state multistep.StateBag, module string) {
|
|
|
|
_, cancelled := state.GetOk(multistep.StateCancelled)
|
|
|
|
_, halted := state.GetOk(multistep.StateHalted)
|
|
|
|
|
|
|
|
ui := state.Get("ui").(packer.Ui)
|
|
|
|
|
|
|
|
if cancelled || halted {
|
|
|
|
ui.Say(fmt.Sprintf("Delete the %s because cancelation or error...", module))
|
|
|
|
} else {
|
|
|
|
ui.Say(fmt.Sprintf("Clean the created %s", module))
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|