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
a341a8a0
Commit
a341a8a0
authored
Sep 01, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure tasks from a role see their defaults above all others
Fixes #12081
parent
c2d5901e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
lib/ansible/vars/__init__.py
+6
-0
No files found.
lib/ansible/vars/__init__.py
View file @
a341a8a0
...
@@ -183,6 +183,12 @@ class VariableManager:
...
@@ -183,6 +183,12 @@ class VariableManager:
for
role
in
play
.
get_roles
():
for
role
in
play
.
get_roles
():
all_vars
=
self
.
_combine_vars
(
all_vars
,
role
.
get_default_vars
())
all_vars
=
self
.
_combine_vars
(
all_vars
,
role
.
get_default_vars
())
# if we have a task in this context, and that task has a role, make
# sure it sees its defaults above any other roles, as we previously
# (v1) made sure each task had a copy of its roles default vars
if
task
and
task
.
_role
is
not
None
:
all_vars
=
self
.
_combine_vars
(
all_vars
,
task
.
_role
.
get_default_vars
())
if
host
:
if
host
:
# next, if a host is specified, we load any vars from group_vars
# next, if a host is specified, we load any vars from group_vars
# files and then any vars from host_vars files which may apply to
# files and then any vars from host_vars files which may apply to
...
...
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