diff --git a/lib/ansible/module_common.py b/lib/ansible/module_common.py index a41b3d0a3e..91b2c4d9b8 100644 --- a/lib/ansible/module_common.py +++ b/lib/ansible/module_common.py @@ -319,7 +319,7 @@ class AnsibleModule(object): if not HAVE_SELINUX or not self.selinux_enabled(): return context try: - ret = selinux.lgetfilecon(self._to_filesystem_str(path)) + ret = selinux.lgetfilecon_raw(self._to_filesystem_str(path)) except OSError, e: if e.errno == errno.ENOENT: self.fail_json(path=path, msg='path %s does not exist' % path)