provisioner/ansible: upload playbooks correctly

`Provision` calls uploadFile on each path in playbook_paths, but
playbook_paths can only contain directories, per bf7530ca28.

This changes `Provision` to call uploadDir instead.
This commit is contained in:
jamie brim 2014-01-17 16:49:17 -08:00
parent 602ed10e89
commit 75f64ef6af
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
}
for _, src := range p.config.PlaybookPaths {
dst := filepath.Join(p.config.StagingDir, "playbooks", filepath.Base(src))
if err := p.uploadFile(ui, comm, dst, src); err != nil {
if err := p.uploadDir(ui, comm, dst, src); err != nil {
return fmt.Errorf("Error uploading playbooks: %s", err)
}
}