From 5bbf0d9cb679d803072535b9c1d9e0db680633ac Mon Sep 17 00:00:00 2001 From: Logan Attwood Date: Wed, 19 Apr 2017 16:37:59 -0300 Subject: [PATCH] Use isfile check on package manager paths --- lib/ansible/module_utils/facts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py index d039c1e4864..546c7bcd39e 100644 --- a/lib/ansible/module_utils/facts.py +++ b/lib/ansible/module_utils/facts.py @@ -330,7 +330,7 @@ class Facts(object): else: self.facts['pkg_mgr'] = 'unknown' for pkg in Facts.PKG_MGRS: - if os.path.exists(pkg['path']): + if os.path.isfile(pkg['path']): self.facts['pkg_mgr'] = pkg['name'] def get_service_mgr_facts(self):