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
73fa767a
Commit
73fa767a
authored
Feb 27, 2014
by
Richard Isaacson
Committed by
James Cammarata
Feb 27, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added instance_tenancy functionality per social request.
parent
ccb64e63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
+9
-1
library/cloud/ec2_vpc
+9
-1
No files found.
library/cloud/ec2_vpc
View file @
73fa767a
...
...
@@ -26,6 +26,12 @@ options:
description:
- "The cidr block representing the VPC, e.g. 10.0.0.0/16"
required: false, unless state=present
instance_tenancy:
description:
- "The supported tenancy options for instances launched into the VPC."
required: false
default: "default"
choices: [ "default", "dedicated" ]
dns_support:
description:
- toggles the "Enable DNS resolution" flag
...
...
@@ -201,6 +207,7 @@ def create_vpc(module, vpc_conn):
id
=
module
.
params
.
get
(
'id'
)
cidr_block
=
module
.
params
.
get
(
'cidr_block'
)
instance_tenancy
=
module
.
params
.
get
(
'instance_tenancy'
)
dns_support
=
module
.
params
.
get
(
'dns_support'
)
dns_hostnames
=
module
.
params
.
get
(
'dns_hostnames'
)
subnets
=
module
.
params
.
get
(
'subnets'
)
...
...
@@ -227,7 +234,7 @@ def create_vpc(module, vpc_conn):
else
:
changed
=
True
try
:
vpc
=
vpc_conn
.
create_vpc
(
cidr_block
)
vpc
=
vpc_conn
.
create_vpc
(
cidr_block
,
instance_tenancy
)
# wait here until the vpc is available
pending
=
True
wait_timeout
=
time
.
time
()
+
wait_timeout
...
...
@@ -483,6 +490,7 @@ def main():
argument_spec
=
ec2_argument_spec
()
argument_spec
.
update
(
dict
(
cidr_block
=
dict
(),
instance_tenancy
=
dict
(
choices
=
[
'default'
,
'dedicated'
],
default
=
'default'
),
wait
=
dict
(
choices
=
BOOLEANS
,
default
=
False
),
wait_timeout
=
dict
(
default
=
300
),
dns_support
=
dict
(
choices
=
BOOLEANS
,
default
=
True
),
...
...
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