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
877dfb81
Commit
877dfb81
authored
Sep 18, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common: Allow user variables to be used for ints/bools/etc. [GH-418]
parent
aa694072
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
CHANGELOG.md
CHANGELOG.md
+2
-0
common/config.go
common/config.go
+3
-2
website/source/docs/templates/user-variables.html.markdown
website/source/docs/templates/user-variables.html.markdown
+1
-1
No files found.
CHANGELOG.md
View file @
877dfb81
...
...
@@ -8,6 +8,8 @@ FEATURES:
IMPROVEMENTS:
*
core: User variables can now be used for integer, boolean, etc.
values. [GH-418]
*
builder/amazon/all: Interrupts work while waiting for AMI to be ready.
BUG FIXES:
...
...
common/config.go
View file @
877dfb81
...
...
@@ -41,8 +41,9 @@ func CheckUnusedConfig(md *mapstructure.Metadata) *packer.MultiError {
func
DecodeConfig
(
target
interface
{},
raws
...
interface
{})
(
*
mapstructure
.
Metadata
,
error
)
{
var
md
mapstructure
.
Metadata
decoderConfig
:=
&
mapstructure
.
DecoderConfig
{
Metadata
:
&
md
,
Result
:
target
,
Metadata
:
&
md
,
Result
:
target
,
WeaklyTypedInput
:
true
,
}
decoder
,
err
:=
mapstructure
.
NewDecoder
(
decoderConfig
)
...
...
website/source/docs/templates/user-variables.html.markdown
View file @
877dfb81
...
...
@@ -54,7 +54,7 @@ validation will fail.
Using the variables is extremely easy. Variables are used by calling
the user function in the form of
<code>
{{user
`
variable
`
}}
</code>
.
This function can be used in _any
string
_ within the template, in
This function can be used in _any
value
_ within the template, in
builders, provisioners, _anything_. The user variable is available globally
within the template.
...
...
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