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
a675b10b
Commit
a675b10b
authored
Mar 12, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10329 from bcoca/var_merge_combined
changed from hash_merge to combine vars which resets default to
parents
ac1493fa
d2443900
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
lib/ansible/playbook/play.py
+5
-5
lib/ansible/runner/__init__.py
+5
-5
No files found.
lib/ansible/playbook/play.py
View file @
a675b10b
...
...
@@ -116,8 +116,8 @@ class Play(object):
_tasks
=
ds
.
pop
(
'tasks'
,
[])
_handlers
=
ds
.
pop
(
'handlers'
,
[])
temp_vars
=
utils
.
merge_hash
(
self
.
vars
,
self
.
vars_file_vars
)
temp_vars
=
utils
.
merge_hash
(
temp_vars
,
self
.
playbook
.
extra_vars
)
temp_vars
=
utils
.
combine_vars
(
self
.
vars
,
self
.
vars_file_vars
)
temp_vars
=
utils
.
combine_vars
(
temp_vars
,
self
.
playbook
.
extra_vars
)
ds
=
template
(
basedir
,
ds
,
temp_vars
)
ds
[
'tasks'
]
=
_tasks
...
...
@@ -646,9 +646,9 @@ class Play(object):
dirname
=
os
.
path
.
dirname
(
original_file
)
# temp vars are used here to avoid trampling on the existing vars structures
temp_vars
=
utils
.
merge_hash
(
self
.
vars
,
self
.
vars_file_vars
)
temp_vars
=
utils
.
merge_hash
(
temp_vars
,
mv
)
temp_vars
=
utils
.
merge_hash
(
temp_vars
,
self
.
playbook
.
extra_vars
)
temp_vars
=
utils
.
combine_vars
(
self
.
vars
,
self
.
vars_file_vars
)
temp_vars
=
utils
.
combine_vars
(
temp_vars
,
mv
)
temp_vars
=
utils
.
combine_vars
(
temp_vars
,
self
.
playbook
.
extra_vars
)
include_file
=
template
(
dirname
,
tokens
[
0
],
temp_vars
)
include_filename
=
utils
.
path_dwim
(
dirname
,
include_file
)
...
...
lib/ansible/runner/__init__.py
View file @
a675b10b
...
...
@@ -666,11 +666,11 @@ class Runner(object):
# 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
)
temp_vars
=
utils
.
merge_hash
(
temp_vars
,
{
'groups'
:
inject
[
'groups'
]}
)
temp_vars
=
utils
.
combine_vars
(
temp_vars
,
inject
[
'combined_cache'
]
)
temp_vars
=
utils
.
combine_vars
(
temp_vars
,
{
'groups'
:
inject
[
'groups'
]}
)
temp_vars
=
utils
.
combine_vars
(
temp_vars
,
self
.
play
_vars
)
temp_vars
=
utils
.
combine_vars
(
temp_vars
,
self
.
play_file
_vars
)
temp_vars
=
utils
.
combine_vars
(
temp_vars
,
self
.
extra_vars
)
hostvars
=
HostVars
(
temp_vars
,
self
.
inventory
,
vault_password
=
self
.
vault_pass
)
...
...
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