mitchellh/packer — pull request #829 by strcrzy (2014-01-18 01:22:31+00:00)
Title: provisioner/ansible: upload playbooks correctly

in #475, @kelseyhightower introduced the `ansible-local` Provisioner, which originally accepted a `playbook_paths` option, an array of paths to files to be copied over to the target.

in bf7530ca28, @whoisjake updated `Prepare` in this Provisioner to validate that each path in `playbook_paths` corresponded to a directory, instead of a file, but did not update the original `Provision` implementation, which still calls `uploadFile` on each path.

the end result appears to be that a user is unable to supply custom playbooks, because the call to `validateFileConfig` in `Prepare` ensures that only a directory can be supplied, while call to `uploadFile` in `Provision` ensures that directory never uploads correctly.

this updates `Provision` to call `uploadDir` instead, which creates the directories on the target, and uploads their contents, which i believe was the intention.