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
64d87bfa
Commit
64d87bfa
authored
Aug 15, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*: switch to packer ConfigTemplate
parent
349a83d6
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
33 additions
and
33 deletions
+33
-33
builder/amazon/chroot/builder.go
builder/amazon/chroot/builder.go
+2
-2
builder/amazon/common/access_config.go
builder/amazon/common/access_config.go
+3
-3
builder/amazon/common/ami_config.go
builder/amazon/common/ami_config.go
+3
-3
builder/amazon/common/run_config.go
builder/amazon/common/run_config.go
+3
-3
builder/amazon/ebs/builder.go
builder/amazon/ebs/builder.go
+2
-2
builder/amazon/instance/builder.go
builder/amazon/instance/builder.go
+2
-2
builder/digitalocean/builder.go
builder/digitalocean/builder.go
+2
-2
builder/virtualbox/builder.go
builder/virtualbox/builder.go
+2
-2
builder/vmware/builder.go
builder/vmware/builder.go
+2
-2
post-processor/vagrant/aws.go
post-processor/vagrant/aws.go
+2
-2
post-processor/vagrant/virtualbox.go
post-processor/vagrant/virtualbox.go
+2
-2
post-processor/vagrant/vmware.go
post-processor/vagrant/vmware.go
+2
-2
provisioner/file/provisioner.go
provisioner/file/provisioner.go
+2
-2
provisioner/salt-masterless/provisioner.go
provisioner/salt-masterless/provisioner.go
+2
-2
provisioner/shell/provisioner.go
provisioner/shell/provisioner.go
+2
-2
No files found.
builder/amazon/chroot/builder.go
View file @
64d87bfa
...
@@ -34,7 +34,7 @@ type Config struct {
...
@@ -34,7 +34,7 @@ type Config struct {
SourceAmi
string
`mapstructure:"source_ami"`
SourceAmi
string
`mapstructure:"source_ami"`
UnmountCommand
string
`mapstructure:"unmount_command"`
UnmountCommand
string
`mapstructure:"unmount_command"`
tpl
*
common
.
Template
tpl
*
packer
.
Config
Template
}
}
type
Builder
struct
{
type
Builder
struct
{
...
@@ -48,7 +48,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
...
@@ -48,7 +48,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
return
err
return
err
}
}
b
.
config
.
tpl
,
err
=
common
.
New
Template
()
b
.
config
.
tpl
,
err
=
packer
.
NewConfig
Template
()
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
builder/amazon/common/access_config.go
View file @
64d87bfa
...
@@ -3,7 +3,7 @@ package common
...
@@ -3,7 +3,7 @@ package common
import
(
import
(
"fmt"
"fmt"
"github.com/mitchellh/goamz/aws"
"github.com/mitchellh/goamz/aws"
"github.com/mitchellh/packer/
common
"
"github.com/mitchellh/packer/
packer
"
"strings"
"strings"
"unicode"
"unicode"
)
)
...
@@ -37,10 +37,10 @@ func (c *AccessConfig) Region() (aws.Region, error) {
...
@@ -37,10 +37,10 @@ func (c *AccessConfig) Region() (aws.Region, error) {
return
aws
.
Regions
[
region
],
nil
return
aws
.
Regions
[
region
],
nil
}
}
func
(
c
*
AccessConfig
)
Prepare
(
t
*
common
.
Template
)
[]
error
{
func
(
c
*
AccessConfig
)
Prepare
(
t
*
packer
.
Config
Template
)
[]
error
{
if
t
==
nil
{
if
t
==
nil
{
var
err
error
var
err
error
t
,
err
=
common
.
New
Template
()
t
,
err
=
packer
.
NewConfig
Template
()
if
err
!=
nil
{
if
err
!=
nil
{
return
[]
error
{
err
}
return
[]
error
{
err
}
}
}
...
...
builder/amazon/common/ami_config.go
View file @
64d87bfa
...
@@ -2,7 +2,7 @@ package common
...
@@ -2,7 +2,7 @@ package common
import
(
import
(
"fmt"
"fmt"
"github.com/mitchellh/packer/
common
"
"github.com/mitchellh/packer/
packer
"
)
)
// AMIConfig is for common configuration related to creating AMIs.
// AMIConfig is for common configuration related to creating AMIs.
...
@@ -14,10 +14,10 @@ type AMIConfig struct {
...
@@ -14,10 +14,10 @@ type AMIConfig struct {
AMIProductCodes
[]
string
`mapstructure:"ami_product_codes"`
AMIProductCodes
[]
string
`mapstructure:"ami_product_codes"`
}
}
func
(
c
*
AMIConfig
)
Prepare
(
t
*
common
.
Template
)
[]
error
{
func
(
c
*
AMIConfig
)
Prepare
(
t
*
packer
.
Config
Template
)
[]
error
{
if
t
==
nil
{
if
t
==
nil
{
var
err
error
var
err
error
t
,
err
=
common
.
New
Template
()
t
,
err
=
packer
.
NewConfig
Template
()
if
err
!=
nil
{
if
err
!=
nil
{
return
[]
error
{
err
}
return
[]
error
{
err
}
}
}
...
...
builder/amazon/common/run_config.go
View file @
64d87bfa
...
@@ -3,7 +3,7 @@ package common
...
@@ -3,7 +3,7 @@ package common
import
(
import
(
"errors"
"errors"
"fmt"
"fmt"
"github.com/mitchellh/packer/
common
"
"github.com/mitchellh/packer/
packer
"
"os"
"os"
"time"
"time"
)
)
...
@@ -27,10 +27,10 @@ type RunConfig struct {
...
@@ -27,10 +27,10 @@ type RunConfig struct {
sshTimeout
time
.
Duration
sshTimeout
time
.
Duration
}
}
func
(
c
*
RunConfig
)
Prepare
(
t
*
common
.
Template
)
[]
error
{
func
(
c
*
RunConfig
)
Prepare
(
t
*
packer
.
Config
Template
)
[]
error
{
if
t
==
nil
{
if
t
==
nil
{
var
err
error
var
err
error
t
,
err
=
common
.
New
Template
()
t
,
err
=
packer
.
NewConfig
Template
()
if
err
!=
nil
{
if
err
!=
nil
{
return
[]
error
{
err
}
return
[]
error
{
err
}
}
}
...
...
builder/amazon/ebs/builder.go
View file @
64d87bfa
...
@@ -28,7 +28,7 @@ type config struct {
...
@@ -28,7 +28,7 @@ type config struct {
// Tags for the AMI
// Tags for the AMI
Tags
map
[
string
]
string
Tags
map
[
string
]
string
tpl
*
common
.
Template
tpl
*
packer
.
Config
Template
}
}
type
Builder
struct
{
type
Builder
struct
{
...
@@ -42,7 +42,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
...
@@ -42,7 +42,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
return
err
return
err
}
}
b
.
config
.
tpl
,
err
=
common
.
New
Template
()
b
.
config
.
tpl
,
err
=
packer
.
NewConfig
Template
()
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
builder/amazon/instance/builder.go
View file @
64d87bfa
...
@@ -38,7 +38,7 @@ type Config struct {
...
@@ -38,7 +38,7 @@ type Config struct {
X509KeyPath
string
`mapstructure:"x509_key_path"`
X509KeyPath
string
`mapstructure:"x509_key_path"`
X509UploadPath
string
`mapstructure:"x509_upload_path"`
X509UploadPath
string
`mapstructure:"x509_upload_path"`
tpl
*
common
.
Template
tpl
*
packer
.
Config
Template
}
}
type
Builder
struct
{
type
Builder
struct
{
...
@@ -52,7 +52,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
...
@@ -52,7 +52,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
return
err
return
err
}
}
b
.
config
.
tpl
,
err
=
common
.
New
Template
()
b
.
config
.
tpl
,
err
=
packer
.
NewConfig
Template
()
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
builder/digitalocean/builder.go
View file @
64d87bfa
...
@@ -43,7 +43,7 @@ type config struct {
...
@@ -43,7 +43,7 @@ type config struct {
eventDelay
time
.
Duration
eventDelay
time
.
Duration
stateTimeout
time
.
Duration
stateTimeout
time
.
Duration
tpl
*
common
.
Template
tpl
*
packer
.
Config
Template
}
}
type
Builder
struct
{
type
Builder
struct
{
...
@@ -57,7 +57,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
...
@@ -57,7 +57,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
return
err
return
err
}
}
b
.
config
.
tpl
,
err
=
common
.
New
Template
()
b
.
config
.
tpl
,
err
=
packer
.
NewConfig
Template
()
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
builder/virtualbox/builder.go
View file @
64d87bfa
...
@@ -57,7 +57,7 @@ type config struct {
...
@@ -57,7 +57,7 @@ type config struct {
bootWait
time
.
Duration
``
bootWait
time
.
Duration
``
shutdownTimeout
time
.
Duration
``
shutdownTimeout
time
.
Duration
``
sshWaitTimeout
time
.
Duration
``
sshWaitTimeout
time
.
Duration
``
tpl
*
common
.
Template
tpl
*
packer
.
Config
Template
}
}
func
(
b
*
Builder
)
Prepare
(
raws
...
interface
{})
error
{
func
(
b
*
Builder
)
Prepare
(
raws
...
interface
{})
error
{
...
@@ -66,7 +66,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
...
@@ -66,7 +66,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
return
err
return
err
}
}
b
.
config
.
tpl
,
err
=
common
.
New
Template
()
b
.
config
.
tpl
,
err
=
packer
.
NewConfig
Template
()
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
builder/vmware/builder.go
View file @
64d87bfa
...
@@ -58,7 +58,7 @@ type config struct {
...
@@ -58,7 +58,7 @@ type config struct {
bootWait
time
.
Duration
``
bootWait
time
.
Duration
``
shutdownTimeout
time
.
Duration
``
shutdownTimeout
time
.
Duration
``
sshWaitTimeout
time
.
Duration
``
sshWaitTimeout
time
.
Duration
``
tpl
*
common
.
Template
tpl
*
packer
.
Config
Template
}
}
func
(
b
*
Builder
)
Prepare
(
raws
...
interface
{})
error
{
func
(
b
*
Builder
)
Prepare
(
raws
...
interface
{})
error
{
...
@@ -67,7 +67,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
...
@@ -67,7 +67,7 @@ func (b *Builder) Prepare(raws ...interface{}) error {
return
err
return
err
}
}
b
.
config
.
tpl
,
err
=
common
.
New
Template
()
b
.
config
.
tpl
,
err
=
packer
.
NewConfig
Template
()
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
post-processor/vagrant/aws.go
View file @
64d87bfa
...
@@ -17,7 +17,7 @@ type AWSBoxConfig struct {
...
@@ -17,7 +17,7 @@ type AWSBoxConfig struct {
OutputPath
string
`mapstructure:"output"`
OutputPath
string
`mapstructure:"output"`
VagrantfileTemplate
string
`mapstructure:"vagrantfile_template"`
VagrantfileTemplate
string
`mapstructure:"vagrantfile_template"`
tpl
*
common
.
Template
tpl
*
packer
.
Config
Template
}
}
type
AWSVagrantfileTemplate
struct
{
type
AWSVagrantfileTemplate
struct
{
...
@@ -34,7 +34,7 @@ func (p *AWSBoxPostProcessor) Configure(raws ...interface{}) error {
...
@@ -34,7 +34,7 @@ func (p *AWSBoxPostProcessor) Configure(raws ...interface{}) error {
return
err
return
err
}
}
p
.
config
.
tpl
,
err
=
common
.
New
Template
()
p
.
config
.
tpl
,
err
=
packer
.
NewConfig
Template
()
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
post-processor/vagrant/virtualbox.go
View file @
64d87bfa
...
@@ -19,7 +19,7 @@ type VBoxBoxConfig struct {
...
@@ -19,7 +19,7 @@ type VBoxBoxConfig struct {
OutputPath
string
`mapstructure:"output"`
OutputPath
string
`mapstructure:"output"`
VagrantfileTemplate
string
`mapstructure:"vagrantfile_template"`
VagrantfileTemplate
string
`mapstructure:"vagrantfile_template"`
tpl
*
common
.
Template
tpl
*
packer
.
Config
Template
}
}
type
VBoxVagrantfileTemplate
struct
{
type
VBoxVagrantfileTemplate
struct
{
...
@@ -36,7 +36,7 @@ func (p *VBoxBoxPostProcessor) Configure(raws ...interface{}) error {
...
@@ -36,7 +36,7 @@ func (p *VBoxBoxPostProcessor) Configure(raws ...interface{}) error {
return
err
return
err
}
}
p
.
config
.
tpl
,
err
=
common
.
New
Template
()
p
.
config
.
tpl
,
err
=
packer
.
NewConfig
Template
()
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
post-processor/vagrant/vmware.go
View file @
64d87bfa
...
@@ -15,7 +15,7 @@ type VMwareBoxConfig struct {
...
@@ -15,7 +15,7 @@ type VMwareBoxConfig struct {
OutputPath
string
`mapstructure:"output"`
OutputPath
string
`mapstructure:"output"`
VagrantfileTemplate
string
`mapstructure:"vagrantfile_template"`
VagrantfileTemplate
string
`mapstructure:"vagrantfile_template"`
tpl
*
common
.
Template
tpl
*
packer
.
Config
Template
}
}
type
VMwareBoxPostProcessor
struct
{
type
VMwareBoxPostProcessor
struct
{
...
@@ -28,7 +28,7 @@ func (p *VMwareBoxPostProcessor) Configure(raws ...interface{}) error {
...
@@ -28,7 +28,7 @@ func (p *VMwareBoxPostProcessor) Configure(raws ...interface{}) error {
return
err
return
err
}
}
p
.
config
.
tpl
,
err
=
common
.
New
Template
()
p
.
config
.
tpl
,
err
=
packer
.
NewConfig
Template
()
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
provisioner/file/provisioner.go
View file @
64d87bfa
...
@@ -17,7 +17,7 @@ type config struct {
...
@@ -17,7 +17,7 @@ type config struct {
// The remote path where the local file will be uploaded to.
// The remote path where the local file will be uploaded to.
Destination
string
Destination
string
tpl
*
common
.
Template
tpl
*
packer
.
Config
Template
}
}
type
Provisioner
struct
{
type
Provisioner
struct
{
...
@@ -30,7 +30,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
...
@@ -30,7 +30,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
return
err
return
err
}
}
p
.
config
.
tpl
,
err
=
common
.
New
Template
()
p
.
config
.
tpl
,
err
=
packer
.
NewConfig
Template
()
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
provisioner/salt-masterless/provisioner.go
View file @
64d87bfa
...
@@ -27,7 +27,7 @@ type Config struct {
...
@@ -27,7 +27,7 @@ type Config struct {
// Where files will be copied before moving to the /srv/salt directory
// Where files will be copied before moving to the /srv/salt directory
TempConfigDir
string
`mapstructure:"temp_config_dir"`
TempConfigDir
string
`mapstructure:"temp_config_dir"`
tpl
*
common
.
Template
tpl
*
packer
.
Config
Template
}
}
type
Provisioner
struct
{
type
Provisioner
struct
{
...
@@ -40,7 +40,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
...
@@ -40,7 +40,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
return
err
return
err
}
}
p
.
config
.
tpl
,
err
=
common
.
New
Template
()
p
.
config
.
tpl
,
err
=
packer
.
NewConfig
Template
()
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
provisioner/shell/provisioner.go
View file @
64d87bfa
...
@@ -52,7 +52,7 @@ type config struct {
...
@@ -52,7 +52,7 @@ type config struct {
RawStartRetryTimeout
string
`mapstructure:"start_retry_timeout"`
RawStartRetryTimeout
string
`mapstructure:"start_retry_timeout"`
startRetryTimeout
time
.
Duration
startRetryTimeout
time
.
Duration
tpl
*
common
.
Template
tpl
*
packer
.
Config
Template
}
}
type
Provisioner
struct
{
type
Provisioner
struct
{
...
@@ -70,7 +70,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
...
@@ -70,7 +70,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
return
err
return
err
}
}
p
.
config
.
tpl
,
err
=
common
.
New
Template
()
p
.
config
.
tpl
,
err
=
packer
.
NewConfig
Template
()
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
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