Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
d422abfc
Commit
d422abfc
authored
Jul 15, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
website: document new shell env vars
parent
0b5f4d9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
website/source/docs/provisioners/shell.html.markdown
website/source/docs/provisioners/shell.html.markdown
+16
-1
No files found.
website/source/docs/provisioners/shell.html.markdown
View file @
d422abfc
...
...
@@ -48,7 +48,8 @@ Optional parameters:
*
`environment_vars`
(array of strings) - An array of key/value pairs
to inject prior to the execute_command. The format should be
`key=value`
.
`key=value`
. Packer injects some environmental variables by default
into the environment, as well, which are covered in the section below.
*
`execute_command`
(string) - The command to use to execute the script.
By default this is
`chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}`
. The value of this is
...
...
@@ -85,3 +86,17 @@ case is being piped in with the value of "packer".
By setting the
`execute_command`
to this, your script(s) can run with
root privileges without worrying about password prompts.
## Default Environmental Variables
In addition to being able to specify custom environmental variables using
the
`environmental_vars`
configuration, the provisioner automatically
defines certain commonly useful environmental variables:
*
`PACKER_BUILD_NAME`
is set to the name of the build that Packer is running.
This is most useful when Packer is making multiple builds and you want to
distinguish them slightly from a common provisioning script.
*
`PACKER_BUILDER_TYPE`
is the type of the builder that was used to create
the machine that the script is running on. This is useful if you want to
run only certain parts of the script on systems built with certain builders.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment