From 5ea974d4d334e947d8a32115522767bcb99dbc51 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Sat, 16 Jun 2012 08:57:05 -0700 Subject: Allow file rendering to pass in a file permission when writing. --- cloudinit/templater.py | 4 ++-- 1 file 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): -- cgit v1.2.3