diff --git a/lib/ansible/module_common.py b/lib/ansible/module_common.py index 062ec0e036..08454467be 100644 --- a/lib/ansible/module_common.py +++ b/lib/ansible/module_common.py @@ -315,7 +315,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)