diff options
author | Michael DeHaan <michael@ansibleworks.com> | 2013-06-10 10:39:19 -0400 |
---|---|---|
committer | Michael DeHaan <michael@ansibleworks.com> | 2013-06-10 10:39:19 -0400 |
commit | 790a145f6c2b9bf561c49cac00473c28a0c6a4a0 (patch) | |
tree | 28e15600c35a49230f9b3dcce8294d3f762a633e | |
parent | 36e9cf5d7de049713784ed7c7005cc2269857e63 (diff) | |
download | ansible-790a145f6c2b9bf561c49cac00473c28a0c6a4a0.tar.gz |
Use get_bin_path for blkid and add some aliases to the filesystem module.
-rwxr-xr-x | library/system/filesystem | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/library/system/filesystem b/library/system/filesystem index b958f100e5..0adad9ad5b 100755 --- a/library/system/filesystem +++ b/library/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() |