diff options
author | Christian Ehrhardt <christian.ehrhardt@canonical.com> | 2016-05-12 15:51:21 +0200 |
---|---|---|
committer | Christian Ehrhardt <christian.ehrhardt@canonical.com> | 2016-05-12 15:51:21 +0200 |
commit | 0d8bf6f2c1464b5f4dab735841a50d02016d2caf (patch) | |
tree | 0d1f4384dbba71ce2b18325bf1b66883278a4640 /cloudinit/templater.py | |
parent | cdee96acdde84071d54764e2554e6ee27702166c (diff) | |
download | vyos-cloud-init-0d8bf6f2c1464b5f4dab735841a50d02016d2caf.tar.gz vyos-cloud-init-0d8bf6f2c1464b5f4dab735841a50d02016d2caf.zip |
add feature to allow a custom template for source list
Diffstat (limited to 'cloudinit/templater.py')
-rw-r--r-- | cloudinit/templater.py | 5 |
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 = {} |