summaryrefslogtreecommitdiff
path: root/cloudinit/templater.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2014-07-16 12:03:47 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2014-07-16 12:03:47 -0700
commit960f7c637d07c81f9e8dab2c81f113ee6654f31d (patch)
treec59806be717d6878b8726f2cc31e16f52038595d /cloudinit/templater.py
parent7dfabbefbadf626503bed8fe4c6e79243bde73ce (diff)
downloadcloud-init-git-960f7c637d07c81f9e8dab2c81f113ee6654f31d.tar.gz
Log the renderer type when rendering files
Diffstat (limited to 'cloudinit/templater.py')
-rw-r--r--cloudinit/templater.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/cloudinit/templater.py b/cloudinit/templater.py
index 459f241a..95916dff 100644
--- a/cloudinit/templater.py
+++ b/cloudinit/templater.py
@@ -121,7 +121,11 @@ def detect_template(text):
def render_from_file(fn, params):
- return render_string(util.load_file(fn), params)
+ if not params:
+ params = {}
+ template_type, renderer, content = detect_template(util.load_file(fn))
+ LOG.debug("Rendering content of '%s' using renderer %s", fn, template_type)
+ return renderer(content, params)
def render_to_file(fn, outfn, params, mode=0644):