community.general/lib/ansible/module_utils/facts/hardware
Erwan Velu 2214c747a2 facts: Detecting NVME partitions under Linux (#39730)
In the current state of the code, the nvme partitions are returned as empty as in :
        "ansible_devices": {
            "nvme0n1": {
                "model": "SAMSUNG MZVLW256HEHP-000L7",
                "partitions": {},

The parsing of the /sys/block/<diskname> try to find a disk named like :
    <diskname><x> as in sda1 for sda

But in the nvme context, the partition of nvme0n1 is named nvme0n1p1.
This add a possible 'p' between the diskname and the partname.

This patch simply add the option of having a 'p' between the diskname
and the partname.

The patch works on my host :
                "model": "INTEL SSDPEDMD400G4",
                "partitions": {
                    "nvme0n1p1": {
                         ...
                        "size": "93.13 GB",
                    }

Fixes #38742
Signed-off-by: Erwan Velu <erwan@redhat.com>
2018-05-07 16:08:46 +01:00
..
__init__.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
aix.py Included ansible_devices for AIX facts/hardware (#31546) 2018-01-22 14:37:45 -05:00
base.py Relicense fact code I wrote to 2 clause BSD 2017-10-19 10:38:39 -07:00
darwin.py Add processor_vcpu fact for Darwin (#30708) 2017-09-22 14:32:59 -04:00
dragonfly.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
freebsd.py made missing cli tools non fatal (#37194) 2018-04-10 17:23:29 -04:00
hpux.py Fact collector ordering deps (#31362) 2018-01-22 18:23:40 -05:00
hurd.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
linux.py facts: Detecting NVME partitions under Linux (#39730) 2018-05-07 16:08:46 +01:00
netbsd.py More statvfs info for mount facts rebase 12073 (#25454) 2017-06-13 15:31:41 -04:00
openbsd.py More statvfs info for mount facts rebase 12073 (#25454) 2017-06-13 15:31:41 -04:00
sunos.py Missing facts in SunOS module 2018-02-01 16:10:33 -08:00