website: document local shell

This commit is contained in:
Mitchell Hashimoto 2015-06-19 15:31:17 -07:00
parent 2dc6155c30
commit d5c0f13d8f
2 changed files with 47 additions and 1 deletions

View File

@ -0,0 +1,45 @@
---
layout: "docs"
page_title: "Local Shell Provisioner"
description: |-
The shell Packer provisioner provisions machines built by Packer using shell scripts. Shell provisioning is the easiest way to get software installed and configured on a machine.
---
# Local Shell Provisioner
Type: `shell-local`
The local shell provisioner executes a local shell script on the machine
running Packer. The [remote shell](/docs/provisioners/shell.html)
provisioner executes shell scripts on a remote machine.
## Basic Example
The example below is fully functional.
```javascript
{
"type": "shell-local",
"command": "echo foo"
}
```
## Configuration Reference
The reference of available configuration options is listed below. The only
required element is "command".
Required:
* `command` (string) - The command to execute. This will be executed
within the context of a shell as specified by `execute_command`.
Optional parameters:
* `execute_command` (array of strings) - The command to use to execute the script.
By default this is `["/bin/sh", "-c", "{{.Command}"]`. The value is an array
of arguments executed directly by the OS.
The value of this is
treated as [configuration template](/docs/templates/configuration-templates.html).
The only available variable is `Command` which is the command to execute.

View File

@ -47,7 +47,8 @@
<ul>
<li><h4>Provisioners</h4></li>
<li><a href="/docs/provisioners/shell.html">Shell Scripts</a></li>
<li><a href="/docs/provisioners/shell.html">Remote Shell</a></li>
<li><a href="/docs/provisioners/shell-local.html">Local Shell</a></li>
<li><a href="/docs/provisioners/file.html">File Uploads</a></li>
<li><a href="/docs/provisioners/powershell.html">PowerShell</a></li>
<li><a href="/docs/provisioners/windows-shell.html">Windows Shell</a></li>