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
f9eb0ba4
Commit
f9eb0ba4
authored
Apr 16, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'devel' of
https://github.com/evanccopengeo/ansible
into evanccopengeo-devel
parents
c5e9a06c
ac64f3c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
13 deletions
+28
-13
library/cloud/ec2
+28
-13
No files found.
library/cloud/ec2
View file @
f9eb0ba4
...
@@ -814,13 +814,19 @@ def create_instances(module, ec2, override_count=None):
...
@@ -814,13 +814,19 @@ def create_instances(module, ec2, override_count=None):
msg
=
"assign_public_ip only available with vpc_subnet_id"
)
msg
=
"assign_public_ip only available with vpc_subnet_id"
)
else
:
else
:
interface
=
boto
.
ec2
.
networkinterface
.
NetworkInterfaceSpecification
(
if
private_ip
:
subnet_id
=
vpc_subnet_id
,
interface
=
boto
.
ec2
.
networkinterface
.
NetworkInterfaceSpecification
(
groups
=
group_id
,
subnet_id
=
vpc_subnet_id
,
associate_public_ip_address
=
assign_public_ip
)
private_ip_address
=
private_ip
,
groups
=
group_id
,
associate_public_ip_address
=
assign_public_ip
)
else
:
interface
=
boto
.
ec2
.
networkinterface
.
NetworkInterfaceSpecification
(
subnet_id
=
vpc_subnet_id
,
groups
=
group_id
,
associate_public_ip_address
=
assign_public_ip
)
interfaces
=
boto
.
ec2
.
networkinterface
.
NetworkInterfaceCollection
(
interface
)
interfaces
=
boto
.
ec2
.
networkinterface
.
NetworkInterfaceCollection
(
interface
)
params
[
'network_interfaces'
]
=
interfaces
params
[
'network_interfaces'
]
=
interfaces
else
:
else
:
params
[
'subnet_id'
]
=
vpc_subnet_id
params
[
'subnet_id'
]
=
vpc_subnet_id
if
vpc_subnet_id
:
if
vpc_subnet_id
:
...
@@ -842,13 +848,22 @@ def create_instances(module, ec2, override_count=None):
...
@@ -842,13 +848,22 @@ def create_instances(module, ec2, override_count=None):
# check to see if we're using spot pricing first before starting instances
# check to see if we're using spot pricing first before starting instances
if
not
spot_price
:
if
not
spot_price
:
params
.
update
(
dict
(
if
assign_public_ip
and
private_ip
:
min_count
=
count_remaining
,
params
.
update
(
dict
(
max_count
=
count_remaining
,
min_count
=
count_remaining
,
client_token
=
id
,
max_count
=
count_remaining
,
placement_group
=
placement_group
,
client_token
=
id
,
private_ip_address
=
private_ip
,
placement_group
=
placement_group
,
))
))
else
:
params
.
update
(
dict
(
min_count
=
count_remaining
,
max_count
=
count_remaining
,
client_token
=
id
,
placement_group
=
placement_group
,
private_ip_address
=
private_ip
,
))
res
=
ec2
.
run_instances
(
**
params
)
res
=
ec2
.
run_instances
(
**
params
)
instids
=
[
i
.
id
for
i
in
res
.
instances
]
instids
=
[
i
.
id
for
i
in
res
.
instances
]
while
True
:
while
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