Merge pull request #3022 from odigity/master

website/docs: added docs for 'file' provisioner
This commit is contained in:
Mitchell Hashimoto 2014-02-25 08:36:04 -08:00
commit 56ed5ef4cb
2 changed files with 34 additions and 0 deletions

View File

@ -149,6 +149,7 @@
<% if sidebar_section == "provisioning" %>
<ul class="sub unstyled">
<li<%= sidebar_current("provisioning-basic") %>><a href="/v2/provisioning/basic_usage.html">Basic Usage</a></li>
<li<%= sidebar_current("provisioning-file") %>><a href="/v2/provisioning/file.html">File</a></li>
<li<%= sidebar_current("provisioning-shell") %>><a href="/v2/provisioning/shell.html">Shell</a></li>
<li<%= sidebar_current("provisioning-ansible") %>><a href="/v2/provisioning/ansible.html">Ansible</a></li>
<li<%= sidebar_current("provisioning-chefsolo") %>><a href="/v2/provisioning/chef_solo.html">Chef Solo</a></li>

View File

@ -0,0 +1,33 @@
---
page_title: "File Uploads - Provisioning"
sidebar_current: "provisioning-file"
---
# File Provisioner
**Provisioner name: `"file"`**
The file provisioner allows you to upload a file from the host machine to
the guest machine.
File provisioning is a simple way to, for example, replicate your local
~/.gitconfig to the vagrant user's home directory on the guest machine so
you won't have to run `git config --global` every time you provision a
new VM.
Note that, unlike with synced folders, files that are uploaded will not
be kept in sync. Continuing with the example above, if you make further
changes to your local ~/.gitconfig, they will not be immediately reflected
in the copy you uploaded to the guest machine.
## Options
The file provisioner takes only two options, both of which are required:
* `source` (string) - Is the local path of the file to be uploaded.
* `destination` (string) - Is the remote path on the guest machine where
the file will be uploaded to. The file is uploaded as the SSH user over
SCP, so this location must be writable to that user. The SSH user can be
determined by running `vagrant ssh-config`, and defaults to "vagrant".