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
5db4d7c0
Commit
5db4d7c0
authored
Jun 22, 2015
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fmt
parent
288b9a70
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
22 deletions
+22
-22
builder/amazon/chroot/step_mount_extra.go
builder/amazon/chroot/step_mount_extra.go
+1
-1
post-processor/vsphere/post-processor.go
post-processor/vsphere/post-processor.go
+12
-12
provisioner/salt-masterless/provisioner_test.go
provisioner/salt-masterless/provisioner_test.go
+9
-9
No files found.
builder/amazon/chroot/step_mount_extra.go
View file @
5db4d7c0
...
@@ -115,7 +115,7 @@ func (s *StepMountExtra) CleanupFunc(state multistep.StateBag) error {
...
@@ -115,7 +115,7 @@ func (s *StepMountExtra) CleanupFunc(state multistep.StateBag) error {
}
}
}
}
}
}
unmountCommand
,
err
:=
wrappedCommand
(
fmt
.
Sprintf
(
"umount %s"
,
path
))
unmountCommand
,
err
:=
wrappedCommand
(
fmt
.
Sprintf
(
"umount %s"
,
path
))
if
err
!=
nil
{
if
err
!=
nil
{
return
fmt
.
Errorf
(
"Error creating unmount command: %s"
,
err
)
return
fmt
.
Errorf
(
"Error creating unmount command: %s"
,
err
)
...
...
post-processor/vsphere/post-processor.go
View file @
5db4d7c0
...
@@ -68,13 +68,13 @@ func (p *PostProcessor) Configure(raws ...interface{}) error {
...
@@ -68,13 +68,13 @@ func (p *PostProcessor) Configure(raws ...interface{}) error {
// First define all our templatable parameters that are _required_
// First define all our templatable parameters that are _required_
templates
:=
map
[
string
]
*
string
{
templates
:=
map
[
string
]
*
string
{
"cluster"
:
&
p
.
config
.
Cluster
,
"cluster"
:
&
p
.
config
.
Cluster
,
"datacenter"
:
&
p
.
config
.
Datacenter
,
"datacenter"
:
&
p
.
config
.
Datacenter
,
"diskmode"
:
&
p
.
config
.
DiskMode
,
"diskmode"
:
&
p
.
config
.
DiskMode
,
"host"
:
&
p
.
config
.
Host
,
"host"
:
&
p
.
config
.
Host
,
"password"
:
&
p
.
config
.
Password
,
"password"
:
&
p
.
config
.
Password
,
"username"
:
&
p
.
config
.
Username
,
"username"
:
&
p
.
config
.
Username
,
"vm_name"
:
&
p
.
config
.
VMName
,
"vm_name"
:
&
p
.
config
.
VMName
,
}
}
for
key
,
ptr
:=
range
templates
{
for
key
,
ptr
:=
range
templates
{
if
*
ptr
==
""
{
if
*
ptr
==
""
{
...
@@ -108,11 +108,11 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
...
@@ -108,11 +108,11 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
}
}
ovftool_uri
:=
fmt
.
Sprintf
(
"vi://%s:%s@%s/%s/host/%s"
,
ovftool_uri
:=
fmt
.
Sprintf
(
"vi://%s:%s@%s/%s/host/%s"
,
url
.
QueryEscape
(
p
.
config
.
Username
),
url
.
QueryEscape
(
p
.
config
.
Username
),
url
.
QueryEscape
(
p
.
config
.
Password
),
url
.
QueryEscape
(
p
.
config
.
Password
),
p
.
config
.
Host
,
p
.
config
.
Host
,
p
.
config
.
Datacenter
,
p
.
config
.
Datacenter
,
p
.
config
.
Cluster
)
p
.
config
.
Cluster
)
if
p
.
config
.
ResourcePool
!=
""
{
if
p
.
config
.
ResourcePool
!=
""
{
ovftool_uri
+=
"/Resources/"
+
p
.
config
.
ResourcePool
ovftool_uri
+=
"/Resources/"
+
p
.
config
.
ResourcePool
...
...
provisioner/salt-masterless/provisioner_test.go
View file @
5db4d7c0
...
@@ -113,18 +113,18 @@ func TestProvisionerSudo(t *testing.T) {
...
@@ -113,18 +113,18 @@ func TestProvisionerSudo(t *testing.T) {
t
.
Fatalf
(
"err: %s"
,
err
)
t
.
Fatalf
(
"err: %s"
,
err
)
}
}
withSudo
:=
p
.
sudo
(
"echo hello"
)
withSudo
:=
p
.
sudo
(
"echo hello"
)
if
withSudo
!=
"sudo echo hello"
{
if
withSudo
!=
"sudo echo hello"
{
t
.
Fatalf
(
"sudo command not generated correctly"
)
t
.
Fatalf
(
"sudo command not generated correctly"
)
}
}
config
[
"disable_sudo"
]
=
true
config
[
"disable_sudo"
]
=
true
err
=
p
.
Prepare
(
config
)
err
=
p
.
Prepare
(
config
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatalf
(
"err: %s"
,
err
)
t
.
Fatalf
(
"err: %s"
,
err
)
}
}
withoutSudo
:=
p
.
sudo
(
"echo hello"
)
withoutSudo
:=
p
.
sudo
(
"echo hello"
)
if
withoutSudo
!=
"echo hello"
{
if
withoutSudo
!=
"echo hello"
{
t
.
Fatalf
(
"sudo-less command not generated correctly"
)
t
.
Fatalf
(
"sudo-less command not generated correctly"
)
}
}
}
}
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