From c3547a23085b9b36877aefec52c81c7dadd37997 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Fri, 3 May 2013 10:39:24 -0400 Subject: [PATCH] Moar SELinux. --- lib/ansible/module_common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/module_common.py b/lib/ansible/module_common.py index c735836350..fec3a7f6d4 100644 --- a/lib/ansible/module_common.py +++ b/lib/ansible/module_common.py @@ -298,7 +298,7 @@ class AnsibleModule(object): context = ret[1].split(':') return context - def selinux_context(self, path) + def selinux_context(self, path): context = self.selinux_initial_context() if not HAVE_SELINUX or not self.selinux_enabled(): return context @@ -843,7 +843,7 @@ class AnsibleModule(object): os.rename(tmp_dest, dest) if self.selinux_enabled(): # rename might not preserve context - self.set_context_if_different(tmp_dest, context, False) + self.set_context_if_different(dest, context, False) rc = True except (shutil.Error, OSError, IOError), e: cleanup()