{"modulePath":"github.com/stackpointcloud/packer","version":"v0.10.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package shell\n\nThis package implements a provisioner for Packer that executes shell scripts within the remote machine.\n\n## Types\n\n```go\ntype Config struct {\n\tcommon.PackerConfig `mapstructure:\",squash\"`\n\n\t// If true, the script contains binary and line endings will not be\n\t// converted from Windows to Unix-style.\n\tBinary bool\n\n\t// An inline script to execute. Multiple strings are all executed\n\t// in the context of a single shell.\n\tInline []string\n\n\t// The shebang value used when running inline scripts.\n\tInlineShebang string `mapstructure:\"inline_shebang\"`\n\n\t// The local path of the shell script to upload and execute.\n\tScript string\n\n\t// An array of multiple scripts to run.\n\tScripts []string\n\n\t// An array of environment variables that will be injected before\n\t// your command(s) are executed.\n\tVars []string `mapstructure:\"environment_vars\"`\n\n\t// The remote folder where the local shell script will be uploaded to.\n\t// This should be set to a pre-existing directory, it defaults to /tmp\n\tRemoteFolder string `mapstructure:\"remote_folder\"`\n\n\t// The remote file name of the local shell script.\n\t// This defaults to script_nnn.sh\n\tRemoteFile string `mapstructure:\"remote_file\"`\n\n\t// The remote path where the local shell script will be uploaded to.\n\t// This should be set to a writable file that is in a pre-existing directory.\n\t// This defaults to remote_folder/remote_file\n\tRemotePath string `mapstructure:\"remote_path\"`\n\n\t// The command used to execute the script. The '{{ .Path }}' variable\n\t// should be used to specify where the script goes, {{ .Vars }}\n\t// can be used to inject the environment_vars into the environment.\n\tExecuteCommand string `mapstructure:\"execute_command\"`\n\n\t// The timeout for retrying to start the process. Until this timeout\n\t// is reached, if the provisioner can't start a process, it retries.\n\t// This can be set high to allow for reboots.\n\tRawStartRetryTimeout string `mapstructure:\"start_retry_timeout\"`\n\n\t// Whether to clean scripts up\n\tSkipClean bool `mapstructure:\"skip_clean\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype ExecuteCommandTemplate struct {\n\tVars string\n\tPath string\n}\n```\n\n```go\ntype Provisioner struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (p *Provisioner) Cancel()\n```\n\n```go\nfunc (p *Provisioner) Prepare(raws ...interface{}) error\n```\n\n```go\nfunc (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error\n```\n\n```go\ntype UnixReader struct {\n\tReader io.Reader\n\t// contains filtered or unexported fields\n}\n```\nUnixReader is a Reader implementation that automatically converts Windows line endings to Unix line endings.\n\n```go\nfunc (r *UnixReader) Read(p []byte) (n int, err error)\n```\n\n","path":"github.com/stackpointcloud/packer/provisioner/shell","name":"shell","synopsis":"This package implements a provisioner for Packer that executes shell scripts within the remote machine.","isRedistributable":true}
