ansible_devices setup does not return serial number for Disks on RHEL 10

I am testing out RHEL 10 and am running into an issue related to disk setup due to ansible not returning serial numbers for disks.

Reviewing the builtin ansible_devices module on RHEL 8, or RHEL 9 each disk will return a serial number. On RHEL 10 the same module doesn’t return a serial number.

It looks like the process uses sg_inq to get a disk Serial, however on RHEL 10 sg_inq does not return a Serial Number (ansible/lib/ansible/module_utils/facts/hardware/linux.py at devel · ansible/ansible · GitHub)

The command to run is sg_inq /dev/sdX

For context, here is the output when running the setup module to get ansible_devices
ansible all -i '123.456.789.0,' -m setup -a "filter=ansible_devices"


Of course when doing the playbook I just reference ansible_devices but to easily reproduce the issue, you can run the adhoc commands, or the sg_inq commands.

I have tried this both on VMware vSphere as well as OpenShift Virtualization, both with the same results.

Additionally, I do have the disk.EnableUUID Advanced parameter set to TRUE on VMware and I can see the serial number through other methods like lsblk.
image

I do have a ticket in with RedHat regarding sg_inq not returning the serial number, but I wanted to report this somewhere since I figure there may be others who are experiencing this.

My current work around has been to just reference the “wwn” that is returned and do a lookup where I append “0x” to the beginning. In my current situation the wwn is “0x” and then the serial number of the disk. But I’m not sure if that works for everything.

Does anybody have any suggestions on a better way to get disk serials, or have any suggestions on how to “address” the fact that the disk facts don’t work the same on RHEL 10 as they do on RHEL 7,8 and 9?

Thank you! Also this is my first post, so I apologize if I’m missing something in my post.