diff --git a/lib/ansible/module_utils/facts/hardware/linux.py b/lib/ansible/module_utils/facts/hardware/linux.py index e781419d98f..d0f6445547b 100644 --- a/lib/ansible/module_utils/facts/hardware/linux.py +++ b/lib/ansible/module_utils/facts/hardware/linux.py @@ -585,7 +585,7 @@ class LinuxHardware(Hardware): d['partitions'] = {} for folder in os.listdir(sysdir): - m = re.search("(" + diskname + r"\d+)", folder) + m = re.search("(" + diskname + r"[p]?\d+)", folder) if m: part = {} partname = m.group(1)