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
43f08b26
Commit
43f08b26
authored
Jan 13, 2015
by
Lesko, Matthew (NIH/NLM/NCBI) [C]
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go fmt all the things
parent
62e054c4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
15 deletions
+15
-15
builder/amazon/common/run_config.go
builder/amazon/common/run_config.go
+1
-1
builder/amazon/common/step_key_pair.go
builder/amazon/common/step_key_pair.go
+12
-12
builder/amazon/ebs/builder.go
builder/amazon/ebs/builder.go
+1
-1
builder/amazon/instance/builder.go
builder/amazon/instance/builder.go
+1
-1
No files found.
builder/amazon/common/run_config.go
View file @
43f08b26
...
...
@@ -87,7 +87,7 @@ func (c *RunConfig) Prepare(t *packer.ConfigTemplate) []error {
}
// if we are not given an explicit keypairname, create a temporary one
if
c
.
SSHKeyPairName
==
""
{
if
c
.
SSHKeyPairName
==
""
{
c
.
TemporaryKeyPairName
=
fmt
.
Sprintf
(
"packer %s"
,
uuid
.
TimeOrderedUUID
())
}
...
...
builder/amazon/common/step_key_pair.go
View file @
43f08b26
...
...
@@ -11,20 +11,20 @@ import (
)
type
StepKeyPair
struct
{
Debug
bool
DebugKeyPath
string
TemporaryKeyPairName
string
KeyPairName
string
PrivateKeyFile
string
Debug
bool
DebugKeyPath
string
TemporaryKeyPairName
string
KeyPairName
string
PrivateKeyFile
string
keyName
string
}
func
(
s
*
StepKeyPair
)
Run
(
state
multistep
.
StateBag
)
multistep
.
StepAction
{
if
s
.
PrivateKeyFile
!=
""
{
if
s
.
KeyPairName
!=
""
{
s
.
keyName
=
s
.
KeyPairName
// need to get from config
}
if
s
.
KeyPairName
!=
""
{
s
.
keyName
=
s
.
KeyPairName
// need to get from config
}
privateKeyBytes
,
err
:=
ioutil
.
ReadFile
(
s
.
PrivateKeyFile
)
if
err
!=
nil
{
...
...
@@ -86,8 +86,8 @@ func (s *StepKeyPair) Run(state multistep.StateBag) multistep.StepAction {
func
(
s
*
StepKeyPair
)
Cleanup
(
state
multistep
.
StateBag
)
{
// If no key name is set, then we never created it, so just return
// If we used an SSH private key file, do not go about deleting
// keypairs
// If we used an SSH private key file, do not go about deleting
// keypairs
if
s
.
PrivateKeyFile
!=
""
{
return
}
...
...
@@ -98,7 +98,7 @@ func (s *StepKeyPair) Cleanup(state multistep.StateBag) {
ui
.
Say
(
"Deleting temporary keypair..."
)
_
,
err
:=
ec2conn
.
DeleteKeyPair
(
s
.
keyName
)
if
err
!=
nil
{
ui
.
Error
(
fmt
.
Sprintf
(
"Error cleaning up keypair. Please delete the key manually: %s"
,
s
.
keyName
))
ui
.
Error
(
fmt
.
Sprintf
(
"Error cleaning up keypair. Please delete the key manually: %s"
,
s
.
keyName
))
}
}
builder/amazon/ebs/builder.go
View file @
43f08b26
...
...
@@ -91,7 +91,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
&
awscommon
.
StepKeyPair
{
Debug
:
b
.
config
.
PackerDebug
,
DebugKeyPath
:
fmt
.
Sprintf
(
"ec2_%s.pem"
,
b
.
config
.
PackerBuildName
),
TemporaryKeyPairName
:
b
.
config
.
TemporaryKeyPairName
,
TemporaryKeyPairName
:
b
.
config
.
TemporaryKeyPairName
,
KeyPairName
:
b
.
config
.
SSHKeyPairName
,
PrivateKeyFile
:
b
.
config
.
SSHPrivateKeyFile
,
},
...
...
builder/amazon/instance/builder.go
View file @
43f08b26
...
...
@@ -196,7 +196,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
&
awscommon
.
StepKeyPair
{
Debug
:
b
.
config
.
PackerDebug
,
DebugKeyPath
:
fmt
.
Sprintf
(
"ec2_%s.pem"
,
b
.
config
.
PackerBuildName
),
TemporaryKeyPairName
:
b
.
config
.
TemporaryKeyPairName
,
TemporaryKeyPairName
:
b
.
config
.
TemporaryKeyPairName
,
KeyPairName
:
b
.
config
.
SSHKeyPairName
,
PrivateKeyFile
:
b
.
config
.
SSHPrivateKeyFile
,
},
...
...
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