From 76393ba285860e0be7d33e437cc23cdb359b3725 Mon Sep 17 00:00:00 2001 From: Rafael Garcia Date: Wed, 9 Oct 2013 13:06:52 -0700 Subject: [PATCH] provisioner/salt-masterless: move states to /srv/salt, not /srv/salt/states Latest version copies local state tree to {tmp}/states and then executes `mv {tmp}/states /srv/salt/`. This creates a `/srv/salt/states` instead of the correct `/srv/salt` directory. --- provisioner/salt-masterless/provisioner.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/provisioner/salt-masterless/provisioner.go b/provisioner/salt-masterless/provisioner.go index 8e0f11f1f..408ae4b45 100644 --- a/provisioner/salt-masterless/provisioner.go +++ b/provisioner/salt-masterless/provisioner.go @@ -150,8 +150,8 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error { return fmt.Errorf("Error uploading local state tree to remote: %s", err) } - ui.Message(fmt.Sprintf("Moving %s to /srv/salt", p.config.TempConfigDir)) - cmd = &packer.RemoteCmd{Command: fmt.Sprintf("sudo mv %s/states /srv/salt/", p.config.TempConfigDir)} + ui.Message(fmt.Sprintf("Moving %s/states to /srv/salt", p.config.TempConfigDir)) + cmd = &packer.RemoteCmd{Command: fmt.Sprintf("sudo mv %s/states /srv/salt", p.config.TempConfigDir)} if err = cmd.StartWithUi(comm, ui); err != nil || cmd.ExitStatus != 0 { if err == nil { err = fmt.Errorf("Bad exit status: %d", cmd.ExitStatus)