diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py index a70608db69b..9515bd1fffe 100644 --- a/lib/ansible/module_utils/facts.py +++ b/lib/ansible/module_utils/facts.py @@ -266,7 +266,7 @@ class Facts(object): self.facts['distribution_release'] = dist[2] or 'NA' # Try to handle the exceptions now ... for (path, name) in Facts.OSDIST_DICT.items(): - if os.path.exists(path): + if os.path.exists(path) and os.path.getsize(path) > 0: if self.facts['distribution'] == 'Fedora': pass elif name == 'RedHat':