Merge pull request #2520 from BayanGroup/salt-ensure-dir-exists

Ensure that `/etc/salt` exists
This commit is contained in:
Chris Bednarski 2015-07-30 19:03:34 -07:00
commit c04feb77b1
1 changed files with 4 additions and 0 deletions

View File

@ -130,6 +130,10 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
}
// move minion config into /etc/salt
ui.Message(fmt.Sprintf("Make sure directory %s exists", "/etc/salt"))
if err := p.createDir(ui, comm, "/etc/salt"); err != nil {
return fmt.Errorf("Error creating remote salt configuration directory: %s", err)
}
src = filepath.ToSlash(filepath.Join(p.config.TempConfigDir, "minion"))
dst = "/etc/salt/minion"
if err = p.moveFile(ui, comm, dst, src); err != nil {