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
0ee28c1a
Commit
0ee28c1a
authored
Jul 02, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure subnets and route_tables are initialized before using
Fixes #7712
parent
67e56853
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
library/cloud/ec2_vpc
+8
-3
No files found.
library/cloud/ec2_vpc
View file @
0ee28c1a
...
...
@@ -274,6 +274,11 @@ def create_vpc(module, vpc_conn):
wait_timeout
=
int
(
module
.
params
.
get
(
'wait_timeout'
))
changed
=
False
if
subnets
is
None
:
subnets
=
[]
if
route_tables
is
None
:
route_tables
=
[]
# Check for existing VPC by cidr_block + tags or id
previous_vpc
=
find_vpc
(
module
,
vpc_conn
,
id
,
cidr_block
)
...
...
@@ -408,7 +413,7 @@ def create_vpc(module, vpc_conn):
if
route_tables
and
not
isinstance
(
route_tables
,
list
):
module
.
fail_json
(
msg
=
'route tables need to be a list of dictionaries'
)
# Work through each route table and update/create to match dictionary array
# Work through each route table and update/create to match dictionary array
all_route_tables
=
[]
for
rt
in
route_tables
:
try
:
...
...
@@ -561,11 +566,11 @@ def main():
wait_timeout
=
dict
(
default
=
300
),
dns_support
=
dict
(
type
=
'bool'
,
default
=
True
),
dns_hostnames
=
dict
(
type
=
'bool'
,
default
=
True
),
subnets
=
dict
(
type
=
'list'
),
subnets
=
dict
(
type
=
'list'
,
default
=
[]
),
vpc_id
=
dict
(),
internet_gateway
=
dict
(
type
=
'bool'
,
default
=
False
),
resource_tags
=
dict
(
type
=
'dict'
),
route_tables
=
dict
(
type
=
'list'
),
route_tables
=
dict
(
type
=
'list'
,
default
=
[]
),
state
=
dict
(
choices
=
[
'present'
,
'absent'
],
default
=
'present'
),
)
)
...
...
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