diff --git a/provisioner/ansible/provisioner.go b/provisioner/ansible/provisioner.go index 378fd7beb..6aa0b07e2 100644 --- a/provisioner/ansible/provisioner.go +++ b/provisioner/ansible/provisioner.go @@ -343,16 +343,6 @@ func (p *Provisioner) Provision(ctx context.Context, ui packer.Ui, comm packer.C return nil } -func (p *Provisioner) Cancel() { - if p.done != nil { - close(p.done) - } - if p.adapter != nil { - p.adapter.Shutdown() - } - os.Exit(0) -} - func (p *Provisioner) executeAnsible(ui packer.Ui, comm packer.Communicator, privKeyFile string) error { playbook, _ := filepath.Abs(p.config.PlaybookFile) inventory := p.config.InventoryFile diff --git a/provisioner/breakpoint/provisioner.go b/provisioner/breakpoint/provisioner.go index 3787ce44d..b6c6f4504 100644 --- a/provisioner/breakpoint/provisioner.go +++ b/provisioner/breakpoint/provisioner.go @@ -3,7 +3,6 @@ package breakpoint import ( "context" "fmt" - "os" "golang.org/x/sync/errgroup" @@ -79,8 +78,3 @@ func (p *Provisioner) Provision(ctx context.Context, ui packer.Ui, comm packer.C } return nil } - -func (p *Provisioner) Cancel() { - // Just hard quit. - os.Exit(0) -} diff --git a/provisioner/converge/provisioner.go b/provisioner/converge/provisioner.go index 20b48bcca..a7ea6f6a9 100644 --- a/provisioner/converge/provisioner.go +++ b/provisioner/converge/provisioner.go @@ -234,9 +234,3 @@ func (p *Provisioner) applyModules(ui packer.Ui, comm packer.Communicator) error return nil } - -// Cancel the provisioning process -func (p *Provisioner) Cancel() { - // there's not an awful lot we can do to cancel Converge at the moment. - // The default semantics are fine. -} diff --git a/provisioner/inspec/provisioner.go b/provisioner/inspec/provisioner.go index 4bc487a8e..618802f9f 100644 --- a/provisioner/inspec/provisioner.go +++ b/provisioner/inspec/provisioner.go @@ -317,15 +317,6 @@ func (p *Provisioner) Provision(ctx context.Context, ui packer.Ui, comm packer.C return nil } -func (p *Provisioner) Cancel() { - if p.done != nil { - close(p.done) - } - if p.adapter != nil { - p.adapter.Shutdown() - } - os.Exit(0) -} func (p *Provisioner) executeInspec(ui packer.Ui, comm packer.Communicator, privKeyFile string) error { var envvars []string diff --git a/provisioner/powershell/provisioner.go b/provisioner/powershell/provisioner.go index 6b0038947..53903ceb9 100644 --- a/provisioner/powershell/provisioner.go +++ b/provisioner/powershell/provisioner.go @@ -305,12 +305,6 @@ func (p *Provisioner) Provision(ctx context.Context, ui packer.Ui, comm packer.C return nil } -func (p *Provisioner) Cancel() { - // Just hard quit. It isn't a big deal if what we're doing keeps running - // on the other side. - os.Exit(0) -} - // Environment variables required within the remote environment are uploaded // within a PS script and then enabled by 'dot sourcing' the script // immediately prior to execution of the main command diff --git a/provisioner/shell-local/provisioner.go b/provisioner/shell-local/provisioner.go index 9768f85b8..f92f93c70 100644 --- a/provisioner/shell-local/provisioner.go +++ b/provisioner/shell-local/provisioner.go @@ -30,7 +30,3 @@ func (p *Provisioner) Provision(ctx context.Context, ui packer.Ui, _ packer.Comm return retErr } - -func (p *Provisioner) Cancel() { - // Just do nothing. When the process ends, so will our provisioner -} diff --git a/provisioner/sleep/provisioner.go b/provisioner/sleep/provisioner.go index 146ac914d..ecd4a4b40 100644 --- a/provisioner/sleep/provisioner.go +++ b/provisioner/sleep/provisioner.go @@ -26,5 +26,3 @@ func (p *Provisioner) Provision(ctx context.Context, _ packer.Ui, _ packer.Commu return nil } } - -func (p *Provisioner) Cancel() {}