mirror of
https://github.com/hashicorp/packer.git
synced 2026-06-11 09:40:17 -04:00
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:
parent
602ed10e89
commit
75f64ef6af
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue