From 00921966eef47b4d12c85f857987f5eba58ac976 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 31 Jul 2013 23:06:22 -0700 Subject: [PATCH] provisioner/salt-masterless: don't capitalize Ui /cc @rgarcia - Not sure why this was capitalized to begin with --- provisioner/salt-masterless/provisioner.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/provisioner/salt-masterless/provisioner.go b/provisioner/salt-masterless/provisioner.go index 233ebeab9..6ec108d26 100644 --- a/provisioner/salt-masterless/provisioner.go +++ b/provisioner/salt-masterless/provisioner.go @@ -59,42 +59,41 @@ func (p *Provisioner) Prepare(raws ...interface{}) error { func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error { var err error - Ui = ui if !p.config.SkipBootstrap { cmd := &packer.RemoteCmd{ Command: fmt.Sprintf("wget -O - http://bootstrap.saltstack.org | sudo sh -s %s", p.config.BootstrapArgs), } - Ui.Say(fmt.Sprintf("Installing Salt with command %s", cmd)) + ui.Say(fmt.Sprintf("Installing Salt with command %s", cmd)) if err = cmd.StartWithUi(comm, ui); err != nil { return fmt.Errorf("Unable to install Salt: %d", err) } } - Ui.Say(fmt.Sprintf("Creating remote directory: %s", p.config.TempConfigDir)) + ui.Say(fmt.Sprintf("Creating remote directory: %s", p.config.TempConfigDir)) cmd := &packer.RemoteCmd{Command: fmt.Sprintf("mkdir -p %s", p.config.TempConfigDir)} if err = cmd.StartWithUi(comm, ui); err != nil { return fmt.Errorf("Error creating remote salt state directory: %s", err) } - Ui.Say(fmt.Sprintf("Uploading local state tree: %s", p.config.LocalStateTree)) + ui.Say(fmt.Sprintf("Uploading local state tree: %s", p.config.LocalStateTree)) if err = UploadLocalDirectory(p.config.LocalStateTree, p.config.TempConfigDir, comm); err != nil { return fmt.Errorf("Error uploading local state tree to remote: %s", err) } - Ui.Say(fmt.Sprintf("Moving %s to /srv/salt", p.config.TempConfigDir)) + ui.Say(fmt.Sprintf("Moving %s to /srv/salt", p.config.TempConfigDir)) cmd = &packer.RemoteCmd{Command: fmt.Sprintf("sudo mv %s /srv/salt", p.config.TempConfigDir)} if err = cmd.StartWithUi(comm, ui); err != nil { return fmt.Errorf("Unable to move %s to /srv/salt: %d", p.config.TempConfigDir, err) } - Ui.Say("Running highstate") + ui.Say("Running highstate") cmd = &packer.RemoteCmd{Command: "sudo salt-call --local state.highstate -l info"} if err = cmd.StartWithUi(comm, ui); err != nil { return fmt.Errorf("Error executing highstate: %s", err) } - Ui.Say("Removing /srv/salt") + ui.Say("Removing /srv/salt") cmd = &packer.RemoteCmd{Command: "sudo rm -r /srv/salt"} if err = cmd.StartWithUi(comm, ui); err != nil { return fmt.Errorf("Unable to remove /srv/salt: %d", err)