Exclude floppy disks from lsblk call for uuids
Fixes #18326
(cherry picked from commit 6ca6a9a291
)
This commit is contained in:
parent
b229898f80
commit
182943f3b3
1 changed files with 5 additions and 1 deletions
|
@ -1213,7 +1213,11 @@ class LinuxHardware(Hardware):
|
||||||
self.facts[k] = 'NA'
|
self.facts[k] = 'NA'
|
||||||
|
|
||||||
def _run_lsblk(self, lsblk_path):
|
def _run_lsblk(self, lsblk_path):
|
||||||
args = ['--list', '--noheadings', '--paths', '--output', 'NAME,UUID']
|
# call lsblk and collect all uuids
|
||||||
|
# --exclude 2 makes lsblk ignore floppy disks, which are slower to answer than typical timeouts
|
||||||
|
# this uses the linux major device number
|
||||||
|
# for details see https://www.kernel.org/doc/Documentation/devices.txt
|
||||||
|
args = ['--list', '--noheadings', '--paths', '--output', 'NAME,UUID', '--exclude', '2']
|
||||||
cmd = [lsblk_path] + args
|
cmd = [lsblk_path] + args
|
||||||
rc, out, err = self.module.run_command(cmd)
|
rc, out, err = self.module.run_command(cmd)
|
||||||
return rc, out, err
|
return rc, out, err
|
||||||
|
|
Loading…
Reference in a new issue