From 467914e3c339fa5cce2a9442875a0999a4da2555 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Tue, 25 Feb 2014 20:08:57 -0600 Subject: [PATCH] filesystem: Ignore blkid cache Sometimes, `blkid` will incorrectly return no information about a block device, even if it exists and has a valid filesystem. This causes the *filesystem* module to fail if *force=no*. Instructing `blkid` to use `/dev/null` as a cache file will force it to rescan the block device on each run, making results more consistent. Signed-off-by: Dustin C. Hatch --- library/system/filesystem | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/system/filesystem b/library/system/filesystem index 698c71d4534..46e798f6e81 100644 --- a/library/system/filesystem +++ b/library/system/filesystem @@ -79,7 +79,7 @@ def main(): cmd = module.get_bin_path('blkid', required=True) - rc,raw_fs,err = module.run_command("%s -o value -s TYPE %s" % (cmd, dev)) + rc,raw_fs,err = module.run_command("%s -c /dev/null -o value -s TYPE %s" % (cmd, dev)) fs = raw_fs.strip()