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
29d41bb7
Commit
29d41bb7
authored
Dec 01, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revise patch from earlier using even more variable sources for HostVars
Superceeds
e61e8a37
Fixes #9684
parent
7329bcde
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletions
+15
-1
lib/ansible/runner/__init__.py
+15
-1
No files found.
lib/ansible/runner/__init__.py
View file @
29d41bb7
...
...
@@ -667,8 +667,22 @@ class Runner(object):
def
_executor_internal
(
self
,
host
,
new_stdin
):
''' executes any module one or more times '''
# We build the proper injected dictionary for all future
# templating operations in this run
inject
=
self
.
get_inject_vars
(
host
)
hostvars
=
HostVars
(
utils
.
merge_hash
(
inject
[
'combined_cache'
],
self
.
extra_vars
),
self
.
inventory
,
vault_password
=
self
.
vault_pass
)
# Then we selectively merge some variable dictionaries down to a
# single dictionary, used to template the HostVars for this host
temp_vars
=
self
.
inventory
.
get_variables
(
host
,
vault_password
=
self
.
vault_pass
)
temp_vars
=
utils
.
merge_hash
(
temp_vars
,
inject
[
'combined_cache'
])
temp_vars
=
utils
.
merge_hash
(
temp_vars
,
self
.
play_vars
)
temp_vars
=
utils
.
merge_hash
(
temp_vars
,
self
.
play_file_vars
)
temp_vars
=
utils
.
merge_hash
(
temp_vars
,
self
.
extra_vars
)
hostvars
=
HostVars
(
temp_vars
,
self
.
inventory
,
vault_password
=
self
.
vault_pass
)
# and we save the HostVars in the injected dictionary so they
# may be referenced from playbooks/templates
inject
[
'hostvars'
]
=
hostvars
host_connection
=
inject
.
get
(
'ansible_connection'
,
self
.
transport
)
...
...
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