summaryrefslogtreecommitdiff
path: root/cloudinit/templater.py
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-05-12 15:51:21 +0200
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-05-12 15:51:21 +0200
commit0d8bf6f2c1464b5f4dab735841a50d02016d2caf (patch)
tree0d1f4384dbba71ce2b18325bf1b66883278a4640 /cloudinit/templater.py
parentcdee96acdde84071d54764e2554e6ee27702166c (diff)
downloadcloud-init-git-0d8bf6f2c1464b5f4dab735841a50d02016d2caf.tar.gz
add feature to allow a custom template for source list
Diffstat (limited to 'cloudinit/templater.py')
-rw-r--r--cloudinit/templater.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/cloudinit/templater.py b/cloudinit/templater.py
index a9231482..8a6ad417 100644
--- a/cloudinit/templater.py
+++ b/cloudinit/templater.py
@@ -142,6 +142,11 @@ def render_to_file(fn, outfn, params, mode=0o644):
util.write_file(outfn, contents, mode=mode)
+def render_string_to_file(content, outfn, params, mode=0o644):
+ contents = render_string(content, params)
+ util.write_file(outfn, contents, mode=mode)
+
+
def render_string(content, params):
if not params:
params = {}