From ea238b66c0fbf536843b89b3709ad825d53706f3 Mon Sep 17 00:00:00 2001 From: David Z Hao Date: Wed, 19 Jun 2019 18:50:16 -0400 Subject: [PATCH 1/2] Make salt-masterless provisioner respect disable_sudo directive for all commands --- provisioner/salt-masterless/provisioner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provisioner/salt-masterless/provisioner.go b/provisioner/salt-masterless/provisioner.go index 38a84fc50..e4aab2a91 100644 --- a/provisioner/salt-masterless/provisioner.go +++ b/provisioner/salt-masterless/provisioner.go @@ -130,7 +130,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error { return fmt.Errorf("Invalid guest_os_type: \"%s\"", p.config.GuestOSType) } - p.guestCommands, err = provisioner.NewGuestCommands(p.config.GuestOSType, false) + p.guestCommands, err = provisioner.NewGuestCommands(p.config.GuestOSType, !p.config.PreventSudo) if err != nil { return fmt.Errorf("Invalid guest_os_type: \"%s\"", p.config.GuestOSType) } From 1d4750a2d96c3f9c8ca0203da12a2da3ceed5aa5 Mon Sep 17 00:00:00 2001 From: David Z Hao Date: Thu, 20 Jun 2019 13:39:51 -0400 Subject: [PATCH 2/2] DisableSudo, not PreventSudo --- provisioner/salt-masterless/provisioner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provisioner/salt-masterless/provisioner.go b/provisioner/salt-masterless/provisioner.go index e4aab2a91..4f530f975 100644 --- a/provisioner/salt-masterless/provisioner.go +++ b/provisioner/salt-masterless/provisioner.go @@ -130,7 +130,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error { return fmt.Errorf("Invalid guest_os_type: \"%s\"", p.config.GuestOSType) } - p.guestCommands, err = provisioner.NewGuestCommands(p.config.GuestOSType, !p.config.PreventSudo) + p.guestCommands, err = provisioner.NewGuestCommands(p.config.GuestOSType, !p.config.DisableSudo) if err != nil { return fmt.Errorf("Invalid guest_os_type: \"%s\"", p.config.GuestOSType) }