summaryrefslogtreecommitdiff
path: root/cloudinit/templater.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-06-16 08:57:05 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-06-16 08:57:05 -0700
commit5ea974d4d334e947d8a32115522767bcb99dbc51 (patch)
tree637769c40eff7ea9cc5afe0fc1545a4fc70e385e /cloudinit/templater.py
parent95573f9d7aa53d9f4c5ba5e969775f9bc59cb5ae (diff)
downloadvyos-cloud-init-5ea974d4d334e947d8a32115522767bcb99dbc51.tar.gz
vyos-cloud-init-5ea974d4d334e947d8a32115522767bcb99dbc51.zip
Allow file rendering to pass in a file permission when writing.
Diffstat (limited to 'cloudinit/templater.py')
-rw-r--r--cloudinit/templater.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/templater.py b/cloudinit/templater.py
index 41315adf..c4259fa0 100644
--- a/cloudinit/templater.py
+++ b/cloudinit/templater.py
@@ -29,9 +29,9 @@ def render_from_file(fn, params):
return render_string(util.load_file(fn), params, name=fn)
-def render_to_file(fn, outfn, params):
+def render_to_file(fn, outfn, params, mode=0644):
contents = render_from_file(fn, params)
- util.write_file(outfn, contents)
+ util.write_file(outfn, contents, mode=mode)
def render_string(content, params, name=None):