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
6570a6c6
Commit
6570a6c6
authored
Dec 01, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use additional vars when templating included file names
Fixes #9669
parent
9bbfdded
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
lib/ansible/playbook/play.py
+7
-1
No files found.
lib/ansible/playbook/play.py
View file @
6570a6c6
...
...
@@ -619,8 +619,14 @@ class Play(object):
dirname
=
self
.
basedir
if
original_file
:
dirname
=
os
.
path
.
dirname
(
original_file
)
include_file
=
template
(
dirname
,
tokens
[
0
],
mv
)
# 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
)
include_file
=
template
(
dirname
,
tokens
[
0
],
temp_vars
)
include_filename
=
utils
.
path_dwim
(
dirname
,
include_file
)
data
=
utils
.
parse_yaml_from_file
(
include_filename
,
vault_password
=
self
.
vault_password
)
if
'role_name'
in
x
and
data
is
not
None
:
for
y
in
data
:
...
...
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