Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
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
configuration
Commits
6697cb1b
Commit
6697cb1b
authored
8 years ago
by
John Eskew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Evaluate tags returned as strings.
parent
08ee464f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
playbooks/library/ec2_lookup
+9
-4
No files found.
playbooks/library/ec2_lookup
View file @
6697cb1b
...
...
@@ -103,14 +103,19 @@ def main():
tags_param
=
module
.
params
.
get
(
'tags'
)
import
pprint
debug_msg
=
"tags_param type: {} - value: {}"
.
format
(
type
(
tags_param
),
pprint
.
pformat
(
tags_param
))
debug_msg
=
"Before: tags_param type: {} - value: {}"
.
format
(
type
(
tags_param
),
pprint
.
pformat
(
tags_param
))
module
.
log
(
debug_msg
)
if
isinstance
(
tags_param
,
basestring
):
tags_param
=
eval
(
tags_param
)
debug_msg
+=
" - After: tags_param type: {} - value: {}"
.
format
(
type
(
tags_param
),
pprint
.
pformat
(
tags_param
))
module
.
log
(
debug_msg
)
tags
=
{}
if
isinstance
(
tags_param
,
list
):
for
item
in
module
.
params
.
get
(
'tags'
):
for
k
,
v
in
item
.
iteritems
():
tags
[
k
]
=
v
for
item
in
tags_param
:
tags
.
update
(
item
)
elif
isinstance
(
tags_param
,
dict
):
tags
=
tags_param
else
:
...
...
This diff is collapsed.
Click to expand it.
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