From a2e9439ee661e7b58f0a9f6e6222827e0569c437 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Tue, 26 May 2020 16:46:31 +0200 Subject: [PATCH] provisioner/salt-masterless: ignore the CmdArgs field in hcl2 (#9290) fix #9233 --- provisioner/salt-masterless/provisioner.go | 2 +- provisioner/salt-masterless/provisioner.hcl2spec.go | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/provisioner/salt-masterless/provisioner.go b/provisioner/salt-masterless/provisioner.go index a4c3f0336..de64b27a2 100644 --- a/provisioner/salt-masterless/provisioner.go +++ b/provisioner/salt-masterless/provisioner.go @@ -67,7 +67,7 @@ type Config struct { SaltBinDir string `mapstructure:"salt_bin_dir"` // Command line args passed onto salt-call - CmdArgs string "" + CmdArgs string `mapstructure-to-hcl2:",skip"` // The Guest OS Type (unix or windows) GuestOSType string `mapstructure:"guest_os_type"` diff --git a/provisioner/salt-masterless/provisioner.hcl2spec.go b/provisioner/salt-masterless/provisioner.hcl2spec.go index 0330c5e8d..4386610eb 100644 --- a/provisioner/salt-masterless/provisioner.hcl2spec.go +++ b/provisioner/salt-masterless/provisioner.hcl2spec.go @@ -31,7 +31,6 @@ type FlatConfig struct { LogLevel *string `mapstructure:"log_level" cty:"log_level"` SaltCallArgs *string `mapstructure:"salt_call_args" cty:"salt_call_args"` SaltBinDir *string `mapstructure:"salt_bin_dir" cty:"salt_bin_dir"` - CmdArgs *string `cty:"cmd_args"` GuestOSType *string `mapstructure:"guest_os_type" cty:"guest_os_type"` } @@ -69,7 +68,6 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec { "log_level": &hcldec.AttrSpec{Name: "log_level", Type: cty.String, Required: false}, "salt_call_args": &hcldec.AttrSpec{Name: "salt_call_args", Type: cty.String, Required: false}, "salt_bin_dir": &hcldec.AttrSpec{Name: "salt_bin_dir", Type: cty.String, Required: false}, - "cmd_args": &hcldec.AttrSpec{Name: "cmd_args", Type: cty.String, Required: false}, "guest_os_type": &hcldec.AttrSpec{Name: "guest_os_type", Type: cty.String, Required: false}, } return s