diff --git a/lib/ansible/module_utils/facts/hardware/linux.py b/lib/ansible/module_utils/facts/hardware/linux.py index b758d11bf7..fd8ffb985a 100644 --- a/lib/ansible/module_utils/facts/hardware/linux.py +++ b/lib/ansible/module_utils/facts/hardware/linux.py @@ -615,7 +615,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)