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
dbaf865e
Commit
dbaf865e
authored
Dec 01, 2014
by
Greg Cockburn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change ordering of ssh connection IP for amazon. fixes #1559
parent
e5c0bf14
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
builder/amazon/common/ssh.go
builder/amazon/common/ssh.go
+3
-3
No files found.
builder/amazon/common/ssh.go
View file @
dbaf865e
...
@@ -16,14 +16,14 @@ func SSHAddress(e *ec2.EC2, port int, private bool) func(multistep.StateBag) (st
...
@@ -16,14 +16,14 @@ func SSHAddress(e *ec2.EC2, port int, private bool) func(multistep.StateBag) (st
for
j
:=
0
;
j
<
2
;
j
++
{
for
j
:=
0
;
j
<
2
;
j
++
{
var
host
string
var
host
string
i
:=
state
.
Get
(
"instance"
)
.
(
*
ec2
.
Instance
)
i
:=
state
.
Get
(
"instance"
)
.
(
*
ec2
.
Instance
)
if
i
.
DNSName
!=
""
{
if
i
.
VpcId
!=
""
{
host
=
i
.
DNSName
}
else
if
i
.
VpcId
!=
""
{
if
i
.
PublicIpAddress
!=
""
&&
!
private
{
if
i
.
PublicIpAddress
!=
""
&&
!
private
{
host
=
i
.
PublicIpAddress
host
=
i
.
PublicIpAddress
}
else
{
}
else
{
host
=
i
.
PrivateIpAddress
host
=
i
.
PrivateIpAddress
}
}
}
else
if
i
.
DNSName
!=
""
{
host
=
i
.
DNSName
}
}
if
host
!=
""
{
if
host
!=
""
{
...
...
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