From c376954ecf1b4b171dcd3a1f6c3265c457a01855 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 9 Jun 2016 15:05:06 -0400 Subject: [PATCH] avoid processing bad mtab entries (#16206) fixes #16174 --- lib/ansible/module_utils/facts.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py index 2fb44db97bc..f98eb9f17f7 100644 --- a/lib/ansible/module_utils/facts.py +++ b/lib/ansible/module_utils/facts.py @@ -1211,6 +1211,8 @@ class LinuxHardware(Hardware): mtab = get_file_content('/etc/mtab', '') for line in mtab.split('\n'): fields = line.rstrip('\n').split() + if len(fields) < 4: + continue if fields[0].startswith('/') or ':/' in fields[0]: if(fields[2] != 'none'): size_total, size_available = self._get_mount_size_facts(fields[1])