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
56f9328f
Commit
56f9328f
authored
Aug 11, 2014
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge
parent
b3371b8d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
lib/ansible/runner/__init__.py
+7
-2
No files found.
lib/ansible/runner/__init__.py
View file @
56f9328f
...
...
@@ -47,6 +47,8 @@ from return_data import ReturnData
from
ansible.callbacks
import
DefaultRunnerCallbacks
,
vv
from
ansible.module_common
import
ModuleReplacer
from
ansible.module_utils.splitter
import
split_args
from
ansible.cache
import
FactCache
from
ansible.utils
import
update_hash
module_replacer
=
ModuleReplacer
(
strip_comments
=
False
)
...
...
@@ -87,7 +89,7 @@ class HostVars(dict):
def
__init__
(
self
,
vars_cache
,
inventory
,
vault_password
=
None
):
self
.
vars_cache
=
vars_cache
self
.
inventory
=
inventory
self
.
lookup
=
dict
()
self
.
lookup
=
{}
self
.
update
(
vars_cache
)
self
.
vault_password
=
vault_password
...
...
@@ -158,7 +160,7 @@ class Runner(object):
# storage & defaults
self
.
check
=
check
self
.
diff
=
diff
self
.
setup_cache
=
utils
.
default
(
setup_cache
,
lambda
:
collections
.
defaultdict
(
dict
))
self
.
setup_cache
=
utils
.
default
(
setup_cache
,
lambda
:
ansible
.
cache
.
FactCache
(
))
self
.
vars_cache
=
utils
.
default
(
vars_cache
,
lambda
:
collections
.
defaultdict
(
dict
))
self
.
basedir
=
utils
.
default
(
basedir
,
lambda
:
os
.
getcwd
())
self
.
callbacks
=
utils
.
default
(
callbacks
,
lambda
:
DefaultRunnerCallbacks
())
...
...
@@ -588,6 +590,7 @@ class Runner(object):
# merge the VARS and SETUP caches for this host
combined_cache
=
self
.
setup_cache
.
copy
()
combined_cache
.
setdefault
(
host
,
{})
.
update
(
self
.
vars_cache
.
get
(
host
,
{}))
hostvars
=
HostVars
(
combined_cache
,
self
.
inventory
,
vault_password
=
self
.
vault_pass
)
# use combined_cache and host_variables to template the module_vars
...
...
@@ -890,6 +893,7 @@ class Runner(object):
until
=
self
.
module_vars
.
get
(
'until'
,
None
)
if
until
is
not
None
and
result
.
comm_ok
:
inject
[
self
.
module_vars
.
get
(
'register'
)]
=
result
.
result
cond
=
template
.
template
(
self
.
basedir
,
until
,
inject
,
expand_lists
=
False
)
if
not
utils
.
check_conditional
(
cond
,
self
.
basedir
,
inject
,
fail_on_undefined
=
self
.
error_on_undefined_vars
):
retries
=
self
.
module_vars
.
get
(
'retries'
)
...
...
@@ -964,6 +968,7 @@ class Runner(object):
if
self
.
diff
:
self
.
callbacks
.
on_file_diff
(
conn
.
host
,
result
.
diff
)
self
.
callbacks
.
on_ok
(
host
,
data
)
return
result
def
_early_needs_tmp_path
(
self
,
module_name
,
handler
):
...
...
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