From 30cab814e85b710fdbdbee94db15a920c5699863 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Mon, 10 Jun 2013 10:39:19 -0400 Subject: [PATCH] Use get_bin_path for blkid and add some aliases to the filesystem module. --- system/filesystem | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/system/filesystem b/system/filesystem index b958f100e5c..0adad9ad5b0 100755 --- a/system/filesystem +++ b/system/filesystem @@ -56,8 +56,8 @@ notes: def main(): module = AnsibleModule( argument_spec = dict( - fstype=dict(required=True), - dev=dict(required=True), + fstype=dict(required=True, aliases=['type']), + dev=dict(required=True, aliases=['device']), opts=dict(), force=dict(type='bool', default='no'), ), @@ -74,7 +74,9 @@ def main(): if not os.path.exists(dev): module.fail_json(msg="Device %s not found."%dev) - rc,raw_fs,err = module.run_command("blkid -o value -s TYPE %s"%(dev)) + cmd = module.get_bin_path('blkid', required=True) + + rc,raw_fs,err = module.run_command("%s -o value -s TYPE %s" % (cmd, dev)) fs = raw_fs.strip()