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
7e542d78
Commit
7e542d78
authored
Oct 10, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote branch 'stijnopheide/jinja-relative' into devel
Conflicts: .gitignore
parents
062484b9
4a6b5c5d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletions
+5
-1
.gitignore
+3
-0
lib/ansible/utils.py
+2
-1
No files found.
.gitignore
View file @
7e542d78
...
...
@@ -16,3 +16,6 @@ rpm-build
.DS_Store
# manpage build results (not all checked in)
docs/man/man3/*
# Sublime stuff
*.sublime-project
*.sublime-workspace
lib/ansible/utils.py
View file @
7e542d78
...
...
@@ -392,7 +392,8 @@ def template_from_file(basedir, path, vars):
''' run a file through the templating engine '''
realpath
=
path_dwim
(
basedir
,
path
)
environment
=
jinja2
.
Environment
(
loader
=
jinja2
.
FileSystemLoader
(
basedir
),
trim_blocks
=
True
)
loader
=
jinja2
.
FileSystemLoader
([
basedir
,
os
.
path
.
dirname
(
realpath
)])
environment
=
jinja2
.
Environment
(
loader
=
loader
,
trim_blocks
=
True
)
environment
.
filters
[
'to_json'
]
=
json
.
dumps
environment
.
filters
[
'from_json'
]
=
json
.
loads
environment
.
filters
[
'to_yaml'
]
=
yaml
.
dump
...
...
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