community.general/lib/ansible/module_utils/facts
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
..
hardware facts: Detecting NVME partitions under Linux (#39730) 2018-05-07 16:08:46 +01:00
network Fix the initial value of a variable 2018-03-18 09:45:29 -07:00
other Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
system made missing cli tools non fatal (#37194) 2018-04-10 17:23:29 -04:00
virtual We need to return virtual_facts after VMWare platform detection (#38237) 2018-04-23 05:43:53 -04:00
__init__.py Relicense fact code I wrote to 2 clause BSD 2017-10-19 10:38:39 -07:00
ansible_collector.py Fix fact deps when 'filter=ansible_fact' is used. (#33441) 2018-01-20 15:07:27 -05:00
collector.py Fact collector ordering deps (#31362) 2018-01-22 18:23:40 -05:00
compat.py Add fact to obtain iSCSI initiator IQN 2018-03-13 17:39:53 -07:00
default_collectors.py Add fact to obtain iSCSI initiator IQN 2018-03-13 17:39:53 -07:00
namespace.py Relicense fact code I wrote to 2 clause BSD 2017-10-19 10:38:39 -07:00
sysctl.py Fix invalid string escape sequences. 2017-11-21 10:03:34 -08:00
timeout.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
utils.py made missing cli tools non fatal (#37194) 2018-04-10 17:23:29 -04:00