From 544dc767047ee73a2405d16bb10450669d2b1b52 Mon Sep 17 00:00:00 2001 From: Stephen Fromm Date: Wed, 24 Oct 2012 20:50:11 -0700 Subject: [PATCH] Create temp file in directory where ssh key lives --- library/authorized_key | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/authorized_key b/library/authorized_key index d75aa96f522..15370aa9885 100755 --- a/library/authorized_key +++ b/library/authorized_key @@ -118,7 +118,7 @@ def readkeys(filename): def writekeys(module, filename, keys): - fd, tmp_path = tempfile.mkstemp() + fd, tmp_path = tempfile.mkstemp('', 'tmp', os.path.dirname(filename)) f = open(tmp_path,"w") try: f.writelines( (key + "\n" for key in keys) )