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
30e72a4b
Commit
30e72a4b
authored
Nov 18, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4842 from cchurch/devel
Retrieve EC2 state when using newer versions of Boto
parents
f18acee7
a6135c1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
+8
-1
plugins/inventory/ec2.py
+8
-1
No files found.
plugins/inventory/ec2.py
View file @
30e72a4b
...
...
@@ -502,7 +502,14 @@ class Ec2Inventory(object):
key
=
self
.
to_safe
(
'ec2_'
+
key
)
# Handle complex types
if
type
(
value
)
in
[
int
,
bool
]:
# state/previous_state changed to properties in boto in https://github.com/boto/boto/commit/a23c379837f698212252720d2af8dec0325c9518
if
key
==
'ec2__state'
:
instance_vars
[
'ec2_state'
]
=
instance
.
state
or
''
instance_vars
[
'ec2_state_code'
]
=
instance
.
state_code
elif
key
==
'ec2__previous_state'
:
instance_vars
[
'ec2_previous_state'
]
=
instance
.
previous_state
or
''
instance_vars
[
'ec2_previous_state_code'
]
=
instance
.
previous_state_code
elif
type
(
value
)
in
[
int
,
bool
]:
instance_vars
[
key
]
=
value
elif
type
(
value
)
in
[
str
,
unicode
]:
instance_vars
[
key
]
=
value
.
strip
()
...
...
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