2018-04-05 18:24:54 -04:00
|
|
|
package arm
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"github.com/hashicorp/packer/helper/multistep"
|
2018-08-10 17:25:14 -04:00
|
|
|
"github.com/hashicorp/packer/packer"
|
2018-04-05 18:24:54 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
type StepSaveWinRMPassword struct {
|
2018-04-16 14:51:04 -04:00
|
|
|
Password string
|
|
|
|
BuildName string
|
2018-04-05 18:24:54 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *StepSaveWinRMPassword) Run(_ context.Context, state multistep.StateBag) multistep.StepAction {
|
|
|
|
// store so that we can access this later during provisioning
|
2018-08-03 13:45:57 -04:00
|
|
|
state.Put("winrm_password", s.Password)
|
2018-08-10 17:25:14 -04:00
|
|
|
packer.LogSecretFilter.Set(s.Password)
|
2018-04-05 18:24:54 -04:00
|
|
|
return multistep.ActionContinue
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *StepSaveWinRMPassword) Cleanup(multistep.StateBag) {
|
|
|
|
}
|