Merge pull request #5624 from ilons/master

Should state that file provisioner requires source at execution time
This commit is contained in:
SwampDragons 2017-11-27 16:47:06 -08:00 committed by GitHub
commit c9072083d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -48,6 +48,9 @@ The available configuration options are listed below. All elements are required.
"upload". If it is set to "download" then the file "source" in the machine "upload". If it is set to "download" then the file "source" in the machine
will be downloaded locally to "destination" will be downloaded locally to "destination"
The source file must exist before running Packer, this means that creating the
file with a provisioner does not work.
## Directory Uploads ## Directory Uploads
The file provisioner is also able to upload a complete directory to the remote The file provisioner is also able to upload a complete directory to the remote
@ -90,6 +93,9 @@ drwxr-xr-x 3 mwhooker staff 102 Jan 27 17:10 a
lrwxr-xr-x 1 mwhooker staff 1 Jan 27 17:10 b -> a lrwxr-xr-x 1 mwhooker staff 1 Jan 27 17:10 b -> a
-rw-r--r-- 1 mwhooker staff 0 Jan 27 17:10 file1 -rw-r--r-- 1 mwhooker staff 0 Jan 27 17:10 file1
lrwxr-xr-x 1 mwhooker staff 5 Jan 27 17:10 file1link -> file1 lrwxr-xr-x 1 mwhooker staff 5 Jan 27 17:10 file1link -> file1
$ ls -l toupload
total 0
-rw-r--r-- 1 mwhooker staff 0 Jan 27 17:10 files.tar
``` ```
``` json ``` json
@ -97,7 +103,7 @@ lrwxr-xr-x 1 mwhooker staff 5 Jan 27 17:10 file1link -> file1
"provisioners": [ "provisioners": [
{ {
"type": "shell-local", "type": "shell-local",
"command": "mkdir -p toupload; tar cf toupload/files.tar files" "command": "tar cf toupload/files.tar files"
}, },
{ {
"destination": "/tmp/", "destination": "/tmp/",