summaryrefslogtreecommitdiff
path: root/lib/ansible/module_utils/facts.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ansible/module_utils/facts.py')
-rw-r--r--lib/ansible/module_utils/facts.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py
index 94b94aa695..9ca8fed850 100644
--- a/lib/ansible/module_utils/facts.py
+++ b/lib/ansible/module_utils/facts.py
@@ -328,6 +328,10 @@ class Facts(object):
else:
proc_1 = os.path.basename(proc_1)
+ # The ps command above may return "COMMAND" if the user cannot read /proc, e.g. with grsecurity
+ if proc_1 == "COMMAND\n":
+ proc_1 = None
+
if proc_1 is not None:
proc_1 = to_native(proc_1)
proc_1 = proc_1.strip()