 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
      View Source
      
  
const TestPEMContents = `` /* 1680-byte string literal not displayed */
    Variables ¶
This section is empty.
Functions ¶
func SSHFileSigner ¶
SSHFileSigner returns an ssh.Signer for a key file.
Types ¶
type Config ¶
type Config struct {
	Type string `mapstructure:"communicator"`
	// SSH
	SSHHost               string        `mapstructure:"ssh_host"`
	SSHPort               int           `mapstructure:"ssh_port"`
	SSHUsername           string        `mapstructure:"ssh_username"`
	SSHPassword           string        `mapstructure:"ssh_password"`
	SSHPrivateKey         string        `mapstructure:"ssh_private_key_file"`
	SSHPty                bool          `mapstructure:"ssh_pty"`
	SSHTimeout            time.Duration `mapstructure:"ssh_timeout"`
	SSHDisableAgent       bool          `mapstructure:"ssh_disable_agent"`
	SSHHandshakeAttempts  int           `mapstructure:"ssh_handshake_attempts"`
	SSHBastionHost        string        `mapstructure:"ssh_bastion_host"`
	SSHBastionPort        int           `mapstructure:"ssh_bastion_port"`
	SSHBastionUsername    string        `mapstructure:"ssh_bastion_username"`
	SSHBastionPassword    string        `mapstructure:"ssh_bastion_password"`
	SSHBastionPrivateKey  string        `mapstructure:"ssh_bastion_private_key_file"`
	SSHFileTransferMethod string        `mapstructure:"ssh_file_transfer_method"`
	// WinRM
	WinRMUser               string        `mapstructure:"winrm_username"`
	WinRMPassword           string        `mapstructure:"winrm_password"`
	WinRMHost               string        `mapstructure:"winrm_host"`
	WinRMPort               int           `mapstructure:"winrm_port"`
	WinRMTimeout            time.Duration `mapstructure:"winrm_timeout"`
	WinRMUseSSL             bool          `mapstructure:"winrm_use_ssl"`
	WinRMInsecure           bool          `mapstructure:"winrm_insecure"`
	WinRMTransportDecorator func(*http.Transport) http.RoundTripper
}
    Config is the common configuration that communicators allow within a builder.
type StepConnect ¶
type StepConnect struct {
	// Config is the communicator config struct
	Config *Config
	// Host should return a host that can be connected to for communicator
	// connections.
	Host func(multistep.StateBag) (string, error)
	// The fields below are callbacks to assist with connecting to SSH.
	//
	// SSHConfig should return the default configuration for
	// connecting via SSH.
	SSHConfig func(multistep.StateBag) (*gossh.ClientConfig, error)
	SSHPort   func(multistep.StateBag) (int, error)
	// The fields below are callbacks to assist with connecting to WinRM.
	//
	// WinRMConfig should return the default configuration for
	// connecting via WinRM.
	WinRMConfig func(multistep.StateBag) (*WinRMConfig, error)
	// CustomConnect can be set to have custom connectors for specific
	// types. These take highest precedence so you can also override
	// existing types.
	CustomConnect map[string]multistep.Step
	// contains filtered or unexported fields
}
    StepConnect is a multistep Step implementation that connects to the proper communicator and stores it in the "communicator" key in the state bag.
func (*StepConnect) Cleanup ¶
func (s *StepConnect) Cleanup(state multistep.StateBag)
func (*StepConnect) Run ¶
func (s *StepConnect) Run(state multistep.StateBag) multistep.StepAction
type StepConnectSSH ¶
type StepConnectSSH struct {
	// All the fields below are documented on StepConnect
	Config    *Config
	Host      func(multistep.StateBag) (string, error)
	SSHConfig func(multistep.StateBag) (*gossh.ClientConfig, error)
	SSHPort   func(multistep.StateBag) (int, error)
}
    StepConnectSSH is a step that only connects to SSH.
In general, you should use StepConnect.
func (*StepConnectSSH) Cleanup ¶
func (s *StepConnectSSH) Cleanup(multistep.StateBag)
func (*StepConnectSSH) Run ¶
func (s *StepConnectSSH) Run(state multistep.StateBag) multistep.StepAction
type StepConnectWinRM ¶
type StepConnectWinRM struct {
	// All the fields below are documented on StepConnect
	Config      *Config
	Host        func(multistep.StateBag) (string, error)
	WinRMConfig func(multistep.StateBag) (*WinRMConfig, error)
	WinRMPort   func(multistep.StateBag) (int, error)
}
    StepConnectWinRM is a multistep Step implementation that waits for WinRM to become available. It gets the connection information from a single configuration when creating the step.
Uses:
ui packer.Ui
Produces:
communicator packer.Communicator
func (*StepConnectWinRM) Cleanup ¶
func (s *StepConnectWinRM) Cleanup(multistep.StateBag)
func (*StepConnectWinRM) Run ¶
func (s *StepConnectWinRM) Run(state multistep.StateBag) multistep.StepAction
type WinRMConfig ¶
WinRMConfig is configuration that can be returned at runtime to dynamically configure WinRM.
 Click to show internal directories. 
   Click to hide internal directories.