2020-01-06 16:36:49 -05:00
|
|
|
package dtl
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"github.com/hashicorp/packer/helper/multistep"
|
|
|
|
"github.com/hashicorp/packer/packer"
|
|
|
|
)
|
|
|
|
|
|
|
|
type StepSaveWinRMPassword struct {
|
|
|
|
Password string
|
|
|
|
BuildName string
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *StepSaveWinRMPassword) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction {
|
|
|
|
// store so that we can access this later during provisioning
|
2020-05-19 05:49:48 -04:00
|
|
|
state.Put("winrm_password", s.Password)
|
2020-01-06 16:36:49 -05:00
|
|
|
packer.LogSecretFilter.Set(s.Password)
|
|
|
|
return multistep.ActionContinue
|
|
|
|
}
|
|
|
|
|
2020-05-19 05:49:48 -04:00
|
|
|
func (s *StepSaveWinRMPassword) Cleanup(multistep.StateBag) {}
|