Commit 75f64ef6 authored by jamie brim's avatar jamie brim

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.
parent 602ed10e
......@@ -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)
}
}
......
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