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
332bdf6e
Commit
332bdf6e
authored
Aug 09, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder/*, provisioner/*: set user vars
parent
670c6c5c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
12 additions
and
4 deletions
+12
-4
builder/amazon/chroot/builder.go
builder/amazon/chroot/builder.go
+1
-0
builder/amazon/ebs/builder.go
builder/amazon/ebs/builder.go
+1
-0
builder/amazon/instance/builder.go
builder/amazon/instance/builder.go
+1
-0
builder/digitalocean/builder.go
builder/digitalocean/builder.go
+1
-0
builder/virtualbox/builder.go
builder/virtualbox/builder.go
+1
-0
builder/vmware/builder.go
builder/vmware/builder.go
+1
-0
provisioner/file/provisioner.go
provisioner/file/provisioner.go
+3
-0
provisioner/shell/provisioner.go
provisioner/shell/provisioner.go
+3
-4
No files found.
builder/amazon/chroot/builder.go
View file @
332bdf6e
...
...
@@ -52,6 +52,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
if
err
!=
nil
{
return
err
}
b
.
config
.
tpl
.
UserVars
=
b
.
config
.
PackerUserVars
// Defaults
if
b
.
config
.
ChrootMounts
==
nil
{
...
...
builder/amazon/ebs/builder.go
View file @
332bdf6e
...
...
@@ -45,6 +45,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
if
err
!=
nil
{
return
err
}
b
.
config
.
tpl
.
UserVars
=
b
.
config
.
PackerUserVars
// Accumulate any errors
errs
:=
common
.
CheckUnusedConfig
(
md
)
...
...
builder/amazon/instance/builder.go
View file @
332bdf6e
...
...
@@ -55,6 +55,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
if
err
!=
nil
{
return
err
}
b
.
config
.
tpl
.
UserVars
=
b
.
config
.
PackerUserVars
if
b
.
config
.
BundleDestination
==
""
{
b
.
config
.
BundleDestination
=
"/tmp"
...
...
builder/digitalocean/builder.go
View file @
332bdf6e
...
...
@@ -61,6 +61,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
if
err
!=
nil
{
return
err
}
b
.
config
.
tpl
.
UserVars
=
b
.
config
.
PackerUserVars
// Accumulate any errors
errs
:=
common
.
CheckUnusedConfig
(
md
)
...
...
builder/virtualbox/builder.go
View file @
332bdf6e
...
...
@@ -70,6 +70,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
if
err
!=
nil
{
return
err
}
b
.
config
.
tpl
.
UserVars
=
b
.
config
.
PackerUserVars
// Accumulate any errors
errs
:=
common
.
CheckUnusedConfig
(
md
)
...
...
builder/vmware/builder.go
View file @
332bdf6e
...
...
@@ -71,6 +71,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
if
err
!=
nil
{
return
err
}
b
.
config
.
tpl
.
UserVars
=
b
.
config
.
PackerUserVars
// Accumulate any errors
errs
:=
common
.
CheckUnusedConfig
(
md
)
...
...
provisioner/file/provisioner.go
View file @
332bdf6e
...
...
@@ -9,6 +9,8 @@ import (
)
type
config
struct
{
common
.
PackerConfig
`mapstructure:",squash"`
// The local path of the file to upload.
Source
string
...
...
@@ -32,6 +34,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
if
err
!=
nil
{
return
err
}
p
.
config
.
tpl
.
UserVars
=
p
.
config
.
PackerUserVars
// Accumulate any errors
errs
:=
common
.
CheckUnusedConfig
(
md
)
...
...
provisioner/shell/provisioner.go
View file @
332bdf6e
...
...
@@ -17,6 +17,8 @@ import (
const
DefaultRemotePath
=
"/tmp/script.sh"
type
config
struct
{
common
.
PackerConfig
`mapstructure:",squash"`
// An inline script to execute. Multiple strings are all executed
// in the context of a single shell.
Inline
[]
string
...
...
@@ -43,10 +45,6 @@ type config struct {
// can be used to inject the environment_vars into the environment.
ExecuteCommand
string
`mapstructure:"execute_command"`
// Packer configurations, these come from Packer itself
PackerBuildName
string
`mapstructure:"packer_build_name"`
PackerBuilderType
string
`mapstructure:"packer_builder_type"`
tpl
*
common
.
Template
}
...
...
@@ -69,6 +67,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
if
err
!=
nil
{
return
err
}
p
.
config
.
tpl
.
UserVars
=
p
.
config
.
PackerUserVars
// Accumulate any errors
errs
:=
common
.
CheckUnusedConfig
(
md
)
...
...
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