Commit 80e36f11 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

provisioner/salt-masterless: fix the build

parent f76a09fc
......@@ -108,6 +108,7 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
}
if p.config.MinionConfig != "" {
ui.Message(fmt.Sprintf("Uploading minion config: %s", p.config.MinionConfig))
err := uploadMinionConfig(comm, "/etc/salt/minion", p.config.MinionConfig)
if err != nil {
return err
......@@ -195,7 +196,6 @@ func UploadLocalDirectory(localDir string, remoteDir string, comm packer.Communi
}
func uploadMinionConfig(comm packer.Communicator, dst string, src string) error {
ui.Message(fmt.Sprintf("Uploading minion config: %s", src))
f, err := os.Open(src)
if err != nil {
return fmt.Errorf("Error opening minion config: %s", err)
......@@ -205,4 +205,6 @@ func uploadMinionConfig(comm packer.Communicator, dst string, src string) error
if err = comm.Upload(dst, f); err != nil {
return fmt.Errorf("Error uploading minion config: %s", err)
}
return nil
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment