Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
f80467e0
Commit
f80467e0
authored
May 30, 2014
by
Yap Sok Ann
Committed by
James Cammarata
Jun 20, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ec2_vpc: Fix error when using InstanceId as a route gateway.
See
https://github.com/ansible/ansible/issues/7368
Fixes #7368
parent
98968989
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
library/cloud/ec2_vpc
+6
-4
No files found.
library/cloud/ec2_vpc
View file @
f80467e0
...
...
@@ -414,15 +414,17 @@ def create_vpc(module, vpc_conn):
try
:
new_rt
=
vpc_conn
.
create_route_table
(
vpc
.
id
)
for
route
in
rt
[
'routes'
]:
r
_gateway
=
route
[
'gw'
]
if
r
_gateway
==
'igw'
:
r
oute_kwargs
=
{}
if
r
oute
[
'gw'
]
==
'igw'
:
if
not
internet_gateway
:
module
.
fail_json
(
msg
=
'You asked for an Internet Gateway '
\
'(igw) route, but you have no Internet Gateway'
)
r_gateway
=
igw
.
id
vpc_conn
.
create_route
(
new_rt
.
id
,
route
[
'dest'
],
r_gateway
)
route_kwargs
[
'gateway_id'
]
=
igw
.
id
else
:
route_kwargs
[
'instance_id'
]
=
route
[
'gw'
]
vpc_conn
.
create_route
(
new_rt
.
id
,
route
[
'dest'
],
**
route_kwargs
)
# Associate with subnets
for
sn
in
rt
[
'subnets'
]:
...
...
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