Merge pull request #7774 from davidhao3300/patch-2

Make salt-masterless provisioner respect disable_sudo directive for all commands
This commit is contained in:
Megan Marsh 2019-06-28 14:42:20 -07:00 committed by GitHub
commit 9e5b12cbf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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.DisableSudo)
if err != nil {
return fmt.Errorf("Invalid guest_os_type: \"%s\"", p.config.GuestOSType)
}