sudo prefix the command which cleans up `/srv/{salt,pillar}` as these are created with sudo in the packer driven salt bootstrapper

pull/5240/head
Brett Russ 9 years ago
parent 850ae8ac65
commit 7192c46e46

@ -384,7 +384,7 @@ func (p *Provisioner) createDir(ui packer.Ui, comm packer.Communicator, dir stri
func (p *Provisioner) removeDir(ui packer.Ui, comm packer.Communicator, dir string) error {
ui.Message(fmt.Sprintf("Removing directory: %s", dir))
cmd := &packer.RemoteCmd{
Command: fmt.Sprintf("rm -rf '%s'", dir),
Command: fmt.Sprintf(p.sudo("rm -rf '%s'"), dir),
}
if err := cmd.StartWithUi(comm, ui); err != nil {
return err

Loading…
Cancel
Save