Allow recreation of same FS with force=yes

This commit is contained in:
Alexander Bulimov 2016-01-13 17:39:42 +03:00
parent 39d6066f51
commit ab9b0558d3

View file

@ -140,7 +140,7 @@ def main():
rc,raw_fs,err = module.run_command("%s -c /dev/null -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() fs = raw_fs.strip()
if fs == fstype and resizefs == False: if fs == fstype and resizefs == False and not force:
module.exit_json(changed=False) module.exit_json(changed=False)
elif fs == fstype and resizefs == True: elif fs == fstype and resizefs == True:
cmd = module.get_bin_path(growcmd, required=True) cmd = module.get_bin_path(growcmd, required=True)