From 5516ece8594662985d776244bd58c1498bc1b70a Mon Sep 17 00:00:00 2001 From: Scott Sturdivant Date: Thu, 23 May 2013 12:13:09 -0600 Subject: [PATCH] Ensure the tmp_path is sufficiently open. --- lib/ansible/runner/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index 0f9906bb31..4b71624248 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -662,7 +662,7 @@ class Runner(object): basetmp = os.path.join('/tmp', basefile) cmd = 'mkdir -p %s' % basetmp - if self.remote_user != 'root': + if self.remote_user != 'root' or (self.sudo and self.sudo_user != 'root'): cmd += ' && chmod a+rx %s' % basetmp cmd += ' && echo %s' % basetmp