Commit 715662f6 authored by Chris Bednarski's avatar Chris Bednarski

Reformat

parent ff6a0915
......@@ -24,8 +24,8 @@ type Communicator struct {
HostDir string
ContainerDir string
Version *version.Version
Config *Config
lock sync.Mutex
Config *Config
lock sync.Mutex
}
func (c *Communicator) Start(remote *packer.RemoteCmd) error {
......
......@@ -26,7 +26,7 @@ func (s *StepConnectDocker) Run(state multistep.StateBag) multistep.StepAction {
HostDir: tempDir,
ContainerDir: "/packer-files",
Version: version,
Config: config,
Config: config,
}
state.Put("communicator", comm)
......
......@@ -75,10 +75,10 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
Flavor: b.config.Flavor,
},
&StepKeyPair{
Debug: b.config.PackerDebug,
DebugKeyPath: fmt.Sprintf("os_%s.pem", b.config.PackerBuildName),
KeyPairName: b.config.SSHKeyPairName,
PrivateKeyFile: b.config.RunConfig.Comm.SSHPrivateKey,
Debug: b.config.PackerDebug,
DebugKeyPath: fmt.Sprintf("os_%s.pem", b.config.PackerBuildName),
KeyPairName: b.config.SSHKeyPairName,
PrivateKeyFile: b.config.RunConfig.Comm.SSHPrivateKey,
},
&StepRunSourceServer{
Name: b.config.ImageName,
......
......@@ -10,9 +10,9 @@ import (
// RunConfig contains configuration for running an instance from a source
// image and details on how to access that launched image.
type RunConfig struct {
Comm communicator.Config `mapstructure:",squash"`
Comm communicator.Config `mapstructure:",squash"`
SSHKeyPairName string `mapstructure:"ssh_keypair_name"`
SSHInterface string `mapstructure:"ssh_interface"`
SSHInterface string `mapstructure:"ssh_interface"`
SourceImage string `mapstructure:"source_image"`
Flavor string `mapstructure:"flavor"`
......
......@@ -13,12 +13,12 @@ import (
)
type StepKeyPair struct {
Debug bool
DebugKeyPath string
KeyPairName string
PrivateKeyFile string
Debug bool
DebugKeyPath string
KeyPairName string
PrivateKeyFile string
keyName string
keyName string
}
func (s *StepKeyPair) Run(state multistep.StateBag) multistep.StepAction {
......
......@@ -287,10 +287,10 @@ func (p *Provisioner) createKnifeConfig(ui packer.Ui, comm packer.Communicator,
ctx := p.config.ctx
ctx.Data = &ConfigTemplate{
NodeName: nodeName,
ServerUrl: serverUrl,
ClientKey: clientKey,
SslVerifyMode: sslVerifyMode,
NodeName: nodeName,
ServerUrl: serverUrl,
ClientKey: clientKey,
SslVerifyMode: sslVerifyMode,
}
configString, err := interpolate.Render(tpl, &ctx)
if err != nil {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment