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
b09f1f8e
Commit
b09f1f8e
authored
Jul 22, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Account for filters in bare variable conversion
Fixes #11530
parent
ae54792a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
lib/ansible/template/__init__.py
+3
-2
No files found.
lib/ansible/template/__init__.py
View file @
b09f1f8e
...
@@ -211,8 +211,9 @@ class Templar:
...
@@ -211,8 +211,9 @@ class Templar:
'''
'''
if
isinstance
(
variable
,
basestring
):
if
isinstance
(
variable
,
basestring
):
first_part
=
variable
.
split
(
"."
)[
0
]
.
split
(
"["
)[
0
]
contains_filters
=
"|"
in
variable
if
first_part
in
self
.
_available_variables
and
self
.
environment
.
variable_start_string
not
in
variable
:
first_part
=
variable
.
split
(
"|"
)[
0
]
.
split
(
"."
)[
0
]
.
split
(
"["
)[
0
]
if
(
contains_filters
or
first_part
in
self
.
_available_variables
)
and
self
.
environment
.
variable_start_string
not
in
variable
:
return
"
%
s
%
s
%
s"
%
(
self
.
environment
.
variable_start_string
,
variable
,
self
.
environment
.
variable_end_string
)
return
"
%
s
%
s
%
s"
%
(
self
.
environment
.
variable_start_string
,
variable
,
self
.
environment
.
variable_end_string
)
# the variable didn't meet the conditions to be converted,
# the variable didn't meet the conditions to be converted,
...
...
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