From de17afbefc1a330031631b8665d161a18fca7e5b Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Thu, 30 Jan 2020 14:58:04 -0800 Subject: [PATCH 1/2] switch trilean to boolean in docs to prevent confusion --- cmd/struct-markdown/main.go | 2 ++ .../alicloud/ecs/_AlicloudDiskDevice-not-required.html.md | 2 +- .../alicloud/ecs/_AlicloudImageConfig-not-required.html.md | 2 +- .../builder/alicloud/ecs/_RunConfig-not-required.html.md | 2 +- .../builder/amazon/common/_AMIConfig-not-required.html.md | 4 ++-- .../builder/amazon/common/_BlockDevice-not-required.html.md | 2 +- .../builder/amazon/ebsvolume/_Config-not-required.html.md | 2 +- 7 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cmd/struct-markdown/main.go b/cmd/struct-markdown/main.go index 9d0bf3a5b..77ba2cd9f 100644 --- a/cmd/struct-markdown/main.go +++ b/cmd/struct-markdown/main.go @@ -114,6 +114,8 @@ func main() { switch fieldType { case "time.Duration": fieldType = `duration string | ex: "1h5m2s"` + case "config.Trilean": + fieldType = `boolean` } field := Field{ diff --git a/website/source/partials/builder/alicloud/ecs/_AlicloudDiskDevice-not-required.html.md b/website/source/partials/builder/alicloud/ecs/_AlicloudDiskDevice-not-required.html.md index d2164920f..6f9e07351 100644 --- a/website/source/partials/builder/alicloud/ecs/_AlicloudDiskDevice-not-required.html.md +++ b/website/source/partials/builder/alicloud/ecs/_AlicloudDiskDevice-not-required.html.md @@ -30,7 +30,7 @@ - `disk_device` (string) - Device information of the related instance: such as /dev/xvdb It is null unless the Status is In_use. -- `disk_encrypted` (config.Trilean) - Whether or not to encrypt the data disk. +- `disk_encrypted` (boolean) - Whether or not to encrypt the data disk. If this option is set to true, the data disk will be encryped and corresponding snapshot in the target image will also be encrypted. By default, if this is an extra data disk, Packer will not encrypt the data disk. Otherwise, Packer will keep the encryption setting to what diff --git a/website/source/partials/builder/alicloud/ecs/_AlicloudImageConfig-not-required.html.md b/website/source/partials/builder/alicloud/ecs/_AlicloudImageConfig-not-required.html.md index 0cb15428c..1aaffe8f3 100644 --- a/website/source/partials/builder/alicloud/ecs/_AlicloudImageConfig-not-required.html.md +++ b/website/source/partials/builder/alicloud/ecs/_AlicloudImageConfig-not-required.html.md @@ -19,7 +19,7 @@ uppercase/lowercase letter or a Chinese character, and may contain numbers, _ or -. It cannot begin with http:// or https://. -- `image_encrypted` (config.Trilean) - Whether or not to encrypt the target images, including those copied if image_copy_regions is specified. If this option +- `image_encrypted` (boolean) - Whether or not to encrypt the target images, including those copied if image_copy_regions is specified. If this option is set to true, a temporary image will be created from the provisioned instance in the main region and an encrypted copy will be generated in the same region. By default, Packer will keep the encryption setting to what diff --git a/website/source/partials/builder/alicloud/ecs/_RunConfig-not-required.html.md b/website/source/partials/builder/alicloud/ecs/_RunConfig-not-required.html.md index 2c10f99f1..5e7e69a0d 100644 --- a/website/source/partials/builder/alicloud/ecs/_RunConfig-not-required.html.md +++ b/website/source/partials/builder/alicloud/ecs/_RunConfig-not-required.html.md @@ -3,7 +3,7 @@ - `associate_public_ip_address` (bool) - Associate Public Ip Address - `zone_id` (string) - ID of the zone to which the disk belongs. -- `io_optimized` (config.Trilean) - Whether an ECS instance is I/O optimized or not. If this option is not +- `io_optimized` (boolean) - Whether an ECS instance is I/O optimized or not. If this option is not provided, the value will be determined by product API according to what `instance_type` is used. diff --git a/website/source/partials/builder/amazon/common/_AMIConfig-not-required.html.md b/website/source/partials/builder/amazon/common/_AMIConfig-not-required.html.md index f11acf43f..d6b77c62c 100644 --- a/website/source/partials/builder/amazon/common/_AMIConfig-not-required.html.md +++ b/website/source/partials/builder/amazon/common/_AMIConfig-not-required.html.md @@ -32,7 +32,7 @@ [template engine](/docs/templates/engine.html), see [Build template data](#build-template-data) for more information. -- `ena_support` (config.Trilean) - Enable enhanced networking (ENA but not SriovNetSupport) on +- `ena_support` (boolean) - Enable enhanced networking (ENA but not SriovNetSupport) on HVM-compatible AMIs. If set, add `ec2:ModifyInstanceAttribute` to your AWS IAM policy. @@ -54,7 +54,7 @@ associated with AMIs, which have been deregistered by force_deregister. Default false. -- `encrypt_boot` (config.Trilean) - Whether or not to encrypt the resulting AMI when +- `encrypt_boot` (boolean) - Whether or not to encrypt the resulting AMI when copying a provisioned instance to an AMI. By default, Packer will keep the encryption setting to what it was in the source image. Setting false will result in an unencrypted image, and true will result in an encrypted one. diff --git a/website/source/partials/builder/amazon/common/_BlockDevice-not-required.html.md b/website/source/partials/builder/amazon/common/_BlockDevice-not-required.html.md index 1755685d9..8438070e0 100644 --- a/website/source/partials/builder/amazon/common/_BlockDevice-not-required.html.md +++ b/website/source/partials/builder/amazon/common/_BlockDevice-not-required.html.md @@ -8,7 +8,7 @@ - `device_name` (string) - The device name exposed to the instance (for example, /dev/sdh or xvdh). Required for every device in the block device mapping. -- `encrypted` (config.Trilean) - Indicates whether or not to encrypt the volume. By default, Packer will +- `encrypted` (boolean) - Indicates whether or not to encrypt the volume. By default, Packer will keep the encryption setting to what it was in the source image. Setting false will result in an unencrypted device, and true will result in an encrypted one. diff --git a/website/source/partials/builder/amazon/ebsvolume/_Config-not-required.html.md b/website/source/partials/builder/amazon/ebsvolume/_Config-not-required.html.md index 27cf0f617..e49c6aca0 100644 --- a/website/source/partials/builder/amazon/ebsvolume/_Config-not-required.html.md +++ b/website/source/partials/builder/amazon/ebsvolume/_Config-not-required.html.md @@ -1,6 +1,6 @@ -- `ena_support` (config.Trilean) - Enable enhanced networking (ENA but not SriovNetSupport) on +- `ena_support` (boolean) - Enable enhanced networking (ENA but not SriovNetSupport) on HVM-compatible AMIs. If set, add `ec2:ModifyInstanceAttribute` to your AWS IAM policy. Note: you must make sure enhanced networking is enabled on your instance. See [Amazon's documentation on enabling enhanced From d252a24b8243cd14cb2d5159025c7fb8d97e2c98 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Thu, 30 Jan 2020 15:22:22 -0800 Subject: [PATCH 2/2] allow user to set winrm_host override like we do ssh_host override --- builder/amazon/common/ssh.go | 2 +- builder/amazon/ebs/builder.go | 2 +- builder/amazon/ebssurrogate/builder.go | 2 +- builder/amazon/ebsvolume/builder.go | 2 +- builder/amazon/instance/builder.go | 2 +- builder/cloudstack/builder.go | 2 +- builder/digitalocean/builder.go | 2 +- builder/docker/builder.go | 2 +- builder/docker/comm.go | 2 +- builder/googlecompute/builder.go | 2 +- builder/hyperv/common/ssh.go | 2 +- builder/linode/builder.go | 4 ++-- builder/oneandone/builder.go | 2 +- builder/openstack/ssh.go | 2 +- builder/oracle/classic/builder.go | 6 +++--- builder/oracle/oci/builder.go | 2 +- builder/parallels/common/ssh.go | 2 +- builder/profitbricks/builder.go | 2 +- builder/qemu/builder.go | 2 +- builder/qemu/ssh.go | 2 +- builder/scaleway/builder.go | 2 +- builder/triton/builder.go | 2 +- builder/triton/ssh.go | 2 +- builder/vsphere/clone/builder.go | 2 +- builder/vsphere/iso/builder.go | 2 +- helper/communicator/comm_host.go | 2 +- 26 files changed, 29 insertions(+), 29 deletions(-) diff --git a/builder/amazon/common/ssh.go b/builder/amazon/common/ssh.go index f085a1dca..b1e2dd2d7 100644 --- a/builder/amazon/common/ssh.go +++ b/builder/amazon/common/ssh.go @@ -24,7 +24,7 @@ var ( func SSHHost(e ec2Describer, sshInterface string, host string) func(multistep.StateBag) (string, error) { return func(state multistep.StateBag) (string, error) { if host != "" { - log.Printf("Using ssh_host value: %s", host) + log.Printf("Using host value: %s", host) return host, nil } diff --git a/builder/amazon/ebs/builder.go b/builder/amazon/ebs/builder.go index 99414952e..a76454616 100644 --- a/builder/amazon/ebs/builder.go +++ b/builder/amazon/ebs/builder.go @@ -259,7 +259,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack Host: awscommon.SSHHost( ec2conn, b.config.SSHInterface, - b.config.Comm.SSHHost, + b.config.Comm.Host(), ), SSHConfig: b.config.RunConfig.Comm.SSHConfigFunc(), }, diff --git a/builder/amazon/ebssurrogate/builder.go b/builder/amazon/ebssurrogate/builder.go index f8a51cfee..6007d3fa8 100644 --- a/builder/amazon/ebssurrogate/builder.go +++ b/builder/amazon/ebssurrogate/builder.go @@ -282,7 +282,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack Host: awscommon.SSHHost( ec2conn, b.config.SSHInterface, - b.config.Comm.SSHHost, + b.config.Comm.Host(), ), SSHConfig: b.config.RunConfig.Comm.SSHConfigFunc(), }, diff --git a/builder/amazon/ebsvolume/builder.go b/builder/amazon/ebsvolume/builder.go index eb474a3e8..d7bf8c590 100644 --- a/builder/amazon/ebsvolume/builder.go +++ b/builder/amazon/ebsvolume/builder.go @@ -252,7 +252,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack Host: awscommon.SSHHost( ec2conn, b.config.SSHInterface, - b.config.Comm.SSHHost, + b.config.Comm.Host(), ), SSHConfig: b.config.RunConfig.Comm.SSHConfigFunc(), }, diff --git a/builder/amazon/instance/builder.go b/builder/amazon/instance/builder.go index 98fe6ff03..9fc9d3d30 100644 --- a/builder/amazon/instance/builder.go +++ b/builder/amazon/instance/builder.go @@ -342,7 +342,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack Host: awscommon.SSHHost( ec2conn, b.config.SSHInterface, - b.config.Comm.SSHHost, + b.config.Comm.Host(), ), SSHConfig: b.config.RunConfig.Comm.SSHConfigFunc(), }, diff --git a/builder/cloudstack/builder.go b/builder/cloudstack/builder.go index 4a147b6b3..0572b4f1f 100644 --- a/builder/cloudstack/builder.go +++ b/builder/cloudstack/builder.go @@ -79,7 +79,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack &stepDetachIso{}, &communicator.StepConnect{ Config: &b.config.Comm, - Host: communicator.CommHost(b.config.Comm.SSHHost, "ipaddress"), + Host: communicator.CommHost(b.config.Comm.Host(), "ipaddress"), SSHConfig: b.config.Comm.SSHConfigFunc(), SSHPort: commPort, WinRMPort: commPort, diff --git a/builder/digitalocean/builder.go b/builder/digitalocean/builder.go index 3d4b07920..b4492d7d5 100644 --- a/builder/digitalocean/builder.go +++ b/builder/digitalocean/builder.go @@ -88,7 +88,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack new(stepDropletInfo), &communicator.StepConnect{ Config: &b.config.Comm, - Host: communicator.CommHost(b.config.Comm.SSHHost, "droplet_ip"), + Host: communicator.CommHost(b.config.Comm.Host(), "droplet_ip"), SSHConfig: b.config.Comm.SSHConfigFunc(), }, new(common.StepProvision), diff --git a/builder/docker/builder.go b/builder/docker/builder.go index 07862491f..3b6ae22f5 100644 --- a/builder/docker/builder.go +++ b/builder/docker/builder.go @@ -50,7 +50,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack &StepRun{}, &communicator.StepConnect{ Config: &b.config.Comm, - Host: commHost(b.config.Comm.SSHHost), + Host: commHost(b.config.Comm.Host()), SSHConfig: b.config.Comm.SSHConfigFunc(), CustomConnect: map[string]multistep.Step{ "docker": &StepConnectDocker{}, diff --git a/builder/docker/comm.go b/builder/docker/comm.go index aa21405c5..6feabc3b2 100644 --- a/builder/docker/comm.go +++ b/builder/docker/comm.go @@ -9,7 +9,7 @@ import ( func commHost(host string) func(multistep.StateBag) (string, error) { return func(state multistep.StateBag) (string, error) { if host != "" { - log.Printf("Using ssh_host value: %s", host) + log.Printf("Using host value: %s", host) return host, nil } containerId := state.Get("container_id").(string) diff --git a/builder/googlecompute/builder.go b/builder/googlecompute/builder.go index b88e0cc0f..47167a43f 100644 --- a/builder/googlecompute/builder.go +++ b/builder/googlecompute/builder.go @@ -68,7 +68,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack }, &communicator.StepConnect{ Config: &b.config.Comm, - Host: communicator.CommHost(b.config.Comm.SSHHost, "instance_ip"), + Host: communicator.CommHost(b.config.Comm.Host(), "instance_ip"), SSHConfig: b.config.Comm.SSHConfigFunc(), WinRMConfig: winrmConfig, }, diff --git a/builder/hyperv/common/ssh.go b/builder/hyperv/common/ssh.go index 133f20a91..c152e419c 100644 --- a/builder/hyperv/common/ssh.go +++ b/builder/hyperv/common/ssh.go @@ -11,7 +11,7 @@ func CommHost(host string) func(multistep.StateBag) (string, error) { // Skip IP auto detection if the configuration has an ssh host configured. if host != "" { - log.Printf("Using ssh_host value: %s", host) + log.Printf("Using host value: %s", host) return host, nil } diff --git a/builder/linode/builder.go b/builder/linode/builder.go index 81da942f7..0eff01aec 100644 --- a/builder/linode/builder.go +++ b/builder/linode/builder.go @@ -59,7 +59,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (ret &stepCreateLinode{client}, &communicator.StepConnect{ Config: &b.config.Comm, - Host: commHost(b.config.Comm.SSHHost), + Host: commHost(b.config.Comm.Host()), SSHConfig: b.config.Comm.SSHConfigFunc(), }, &common.StepProvision{}, @@ -104,7 +104,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (ret func commHost(host string) func(multistep.StateBag) (string, error) { return func(state multistep.StateBag) (string, error) { if host != "" { - log.Printf("Using ssh_host value: %s", host) + log.Printf("Using host value: %s", host) return host, nil } diff --git a/builder/oneandone/builder.go b/builder/oneandone/builder.go index 94c9ac31c..8fe3526fd 100644 --- a/builder/oneandone/builder.go +++ b/builder/oneandone/builder.go @@ -46,7 +46,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack new(stepCreateServer), &communicator.StepConnect{ Config: &b.config.Comm, - Host: communicator.CommHost(b.config.Comm.SSHHost, "server_ip"), + Host: communicator.CommHost(b.config.Comm.Host(), "server_ip"), SSHConfig: b.config.Comm.SSHConfigFunc(), }, &common.StepProvision{}, diff --git a/builder/openstack/ssh.go b/builder/openstack/ssh.go index 1f93363c4..dab50dc24 100644 --- a/builder/openstack/ssh.go +++ b/builder/openstack/ssh.go @@ -20,7 +20,7 @@ func CommHost( sshipversion string) func(multistep.StateBag) (string, error) { return func(state multistep.StateBag) (string, error) { if host != "" { - log.Printf("Using ssh_host value: %s", host) + log.Printf("Using host value: %s", host) return host, nil } diff --git a/builder/oracle/classic/builder.go b/builder/oracle/classic/builder.go index 1594dd0e1..6a49f808a 100644 --- a/builder/oracle/classic/builder.go +++ b/builder/oracle/classic/builder.go @@ -103,7 +103,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack }, &communicator.StepConnect{ Config: &b.config.Comm, - Host: communicator.CommHost(b.config.Comm.SSHHost, "instance_ip"), + Host: communicator.CommHost(b.config.Comm.Host(), "instance_ip"), SSHConfig: b.config.Comm.SSHConfigFunc(), }, &common.StepProvision{}, @@ -133,7 +133,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack KeyName: fmt.Sprintf("packer-generated-key_%s", runID), StepConnectSSH: &communicator.StepConnectSSH{ Config: &b.config.BuilderComm, - Host: communicator.CommHost(b.config.Comm.SSHHost, "instance_ip"), + Host: communicator.CommHost(b.config.Comm.Host(), "instance_ip"), SSHConfig: b.config.BuilderComm.SSHConfigFunc(), }, }, @@ -166,7 +166,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack &stepCreateInstance{}, &communicator.StepConnect{ Config: &b.config.Comm, - Host: communicator.CommHost(b.config.Comm.SSHHost, "instance_ip"), + Host: communicator.CommHost(b.config.Comm.Host(), "instance_ip"), SSHConfig: b.config.Comm.SSHConfigFunc(), }, &common.StepProvision{}, diff --git a/builder/oracle/oci/builder.go b/builder/oracle/oci/builder.go index cf1e5249a..96eaee591 100644 --- a/builder/oracle/oci/builder.go +++ b/builder/oracle/oci/builder.go @@ -67,7 +67,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack }, &communicator.StepConnect{ Config: &b.config.Comm, - Host: communicator.CommHost(b.config.Comm.SSHHost, "instance_ip"), + Host: communicator.CommHost(b.config.Comm.Host(), "instance_ip"), SSHConfig: b.config.Comm.SSHConfigFunc(), }, &common.StepProvision{}, diff --git a/builder/parallels/common/ssh.go b/builder/parallels/common/ssh.go index df82c8082..50f4e4e9c 100644 --- a/builder/parallels/common/ssh.go +++ b/builder/parallels/common/ssh.go @@ -10,7 +10,7 @@ import ( func CommHost(host string) func(multistep.StateBag) (string, error) { return func(state multistep.StateBag) (string, error) { if host != "" { - log.Printf("Using ssh_host value: %s", host) + log.Printf("Using host value: %s", host) return host, nil } vmName := state.Get("vmName").(string) diff --git a/builder/profitbricks/builder.go b/builder/profitbricks/builder.go index 86d9d6ca5..f55d6ae0b 100644 --- a/builder/profitbricks/builder.go +++ b/builder/profitbricks/builder.go @@ -43,7 +43,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack new(stepCreateServer), &communicator.StepConnect{ Config: &b.config.Comm, - Host: communicator.CommHost(b.config.Comm.SSHHost, "server_ip"), + Host: communicator.CommHost(b.config.Comm.Host(), "server_ip"), SSHConfig: b.config.Comm.SSHConfigFunc(), }, &common.StepProvision{}, diff --git a/builder/qemu/builder.go b/builder/qemu/builder.go index 32f2402c3..473f356b0 100644 --- a/builder/qemu/builder.go +++ b/builder/qemu/builder.go @@ -652,7 +652,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack steps = append(steps, &communicator.StepConnect{ Config: &b.config.Comm, - Host: commHost(b.config.Comm.SSHHost), + Host: commHost(b.config.Comm.Host()), SSHConfig: b.config.Comm.SSHConfigFunc(), SSHPort: commPort, WinRMPort: commPort, diff --git a/builder/qemu/ssh.go b/builder/qemu/ssh.go index a444dc0c4..828c3946d 100644 --- a/builder/qemu/ssh.go +++ b/builder/qemu/ssh.go @@ -9,7 +9,7 @@ import ( func commHost(host string) func(multistep.StateBag) (string, error) { return func(state multistep.StateBag) (string, error) { if host != "" { - log.Printf("Using ssh_host value: %s", host) + log.Printf("Using host value: %s", host) return host, nil } diff --git a/builder/scaleway/builder.go b/builder/scaleway/builder.go index 0529557e6..1f25a0509 100644 --- a/builder/scaleway/builder.go +++ b/builder/scaleway/builder.go @@ -59,7 +59,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack new(stepServerInfo), &communicator.StepConnect{ Config: &b.config.Comm, - Host: communicator.CommHost(b.config.Comm.SSHHost, "server_ip"), + Host: communicator.CommHost(b.config.Comm.Host(), "server_ip"), SSHConfig: b.config.Comm.SSHConfigFunc(), }, new(common.StepProvision), diff --git a/builder/triton/builder.go b/builder/triton/builder.go index 50d9ddd6d..6ee06785c 100644 --- a/builder/triton/builder.go +++ b/builder/triton/builder.go @@ -67,7 +67,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack &StepCreateSourceMachine{}, &communicator.StepConnect{ Config: &config.Comm, - Host: commHost(b.config.Comm.SSHHost), + Host: commHost(b.config.Comm.Host()), SSHConfig: b.config.Comm.SSHConfigFunc(), }, &common.StepProvision{}, diff --git a/builder/triton/ssh.go b/builder/triton/ssh.go index 70d52d5e8..bc34fd6a9 100644 --- a/builder/triton/ssh.go +++ b/builder/triton/ssh.go @@ -9,7 +9,7 @@ import ( func commHost(host string) func(multistep.StateBag) (string, error) { return func(state multistep.StateBag) (string, error) { if host != "" { - log.Printf("Using ssh_host value: %s", host) + log.Printf("Using host value: %s", host) return host, nil } diff --git a/builder/vsphere/clone/builder.go b/builder/vsphere/clone/builder.go index 56462e345..bb3f9c574 100644 --- a/builder/vsphere/clone/builder.go +++ b/builder/vsphere/clone/builder.go @@ -62,7 +62,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack }, &communicator.StepConnect{ Config: &b.config.Comm, - Host: common.CommHost(b.config.Comm.SSHHost), + Host: common.CommHost(b.config.Comm.Host()), SSHConfig: b.config.Comm.SSHConfigFunc(), }, &packerCommon.StepProvision{}, diff --git a/builder/vsphere/iso/builder.go b/builder/vsphere/iso/builder.go index 89131ed10..1f6a2bd20 100644 --- a/builder/vsphere/iso/builder.go +++ b/builder/vsphere/iso/builder.go @@ -106,7 +106,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack }, &communicator.StepConnect{ Config: &b.config.Comm, - Host: common.CommHost(b.config.Comm.SSHHost), + Host: common.CommHost(b.config.Comm.Host()), SSHConfig: b.config.Comm.SSHConfigFunc(), }, &packerCommon.StepProvision{}, diff --git a/helper/communicator/comm_host.go b/helper/communicator/comm_host.go index adc49b257..8bebcc888 100644 --- a/helper/communicator/comm_host.go +++ b/helper/communicator/comm_host.go @@ -11,7 +11,7 @@ import ( func CommHost(host string, statebagKey string) func(multistep.StateBag) (string, error) { return func(state multistep.StateBag) (string, error) { if host != "" { - log.Printf("Using ssh_host value: %s", host) + log.Printf("Using host value: %s", host) return host, nil } ipAddress, hasIP := state.Get(statebagKey).(string)