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
6e9fa501
Commit
6e9fa501
authored
Sep 06, 2013
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reverting HostVars change from a mapping back to a dictionary
parent
f1eb5b45
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
14 deletions
+2
-14
lib/ansible/runner/__init__.py
+2
-14
No files found.
lib/ansible/runner/__init__.py
View file @
6e9fa501
...
@@ -81,7 +81,7 @@ def _executor_hook(job_queue, result_queue, new_stdin):
...
@@ -81,7 +81,7 @@ def _executor_hook(job_queue, result_queue, new_stdin):
except
:
except
:
traceback
.
print_exc
()
traceback
.
print_exc
()
class
HostVars
(
collections
.
MutableMapping
):
class
HostVars
(
dict
):
''' A special view of setup_cache that adds values from the inventory when needed. '''
''' A special view of setup_cache that adds values from the inventory when needed. '''
def
__init__
(
self
,
setup_cache
,
inventory
):
def
__init__
(
self
,
setup_cache
,
inventory
):
...
@@ -90,25 +90,13 @@ class HostVars(collections.MutableMapping):
...
@@ -90,25 +90,13 @@ class HostVars(collections.MutableMapping):
self
.
lookup
=
dict
()
self
.
lookup
=
dict
()
self
.
update
(
setup_cache
)
self
.
update
(
setup_cache
)
def
__setitem__
(
self
,
host
,
value
):
self
.
lookup
[
host
]
=
value
def
__delitem__
(
self
,
host
):
del
self
.
lookup
[
host
]
def
__getitem__
(
self
,
host
):
def
__getitem__
(
self
,
host
):
if
not
hos
t
in
self
.
lookup
:
if
host
no
t
in
self
.
lookup
:
result
=
self
.
inventory
.
get_variables
(
host
)
result
=
self
.
inventory
.
get_variables
(
host
)
result
.
update
(
self
.
setup_cache
.
get
(
host
,
{}))
result
.
update
(
self
.
setup_cache
.
get
(
host
,
{}))
self
.
lookup
[
host
]
=
result
self
.
lookup
[
host
]
=
result
return
self
.
lookup
[
host
]
return
self
.
lookup
[
host
]
def
__iter__
(
self
):
return
iter
(
self
.
lookup
)
def
__len__
(
self
):
return
len
(
self
.
lookup
)
class
Runner
(
object
):
class
Runner
(
object
):
''' core API interface to ansible '''
''' core API interface to ansible '''
...
...
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