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
fe95745a
Commit
fe95745a
authored
Nov 08, 2013
by
Rob Szewczyk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correcting the security group id lookup from the list of security group names
parent
74e7eba5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
3 deletions
+1
-3
library/cloud/ec2
+1
-3
No files found.
library/cloud/ec2
View file @
fe95745a
...
@@ -392,9 +392,7 @@ def create_instances(module, ec2):
...
@@ -392,9 +392,7 @@ def create_instances(module, ec2):
if
group_name
:
if
group_name
:
grp_details
=
ec2
.
get_all_security_groups
()
grp_details
=
ec2
.
get_all_security_groups
()
if
type
(
group_name
)
==
list
:
if
type
(
group_name
)
==
list
:
# FIXME: this should be a nice list comprehension
group_id
=
[
str
(
grp
.
id
)
for
grp
in
grp_details
if
str
(
grp
.
name
)
in
group_name
]
# also not py 2.4 compliant
group_id
=
list
(
filter
(
lambda
grp
:
str
(
grp
.
id
)
if
str
(
tmp
)
in
str
(
grp
)
else
None
,
grp_details
)
for
tmp
in
group_name
)
elif
type
(
group_name
)
==
str
:
elif
type
(
group_name
)
==
str
:
for
grp
in
grp_details
:
for
grp
in
grp_details
:
if
str
(
group_name
)
in
str
(
grp
):
if
str
(
group_name
)
in
str
(
grp
):
...
...
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