mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fix fatal error when removing logical volumes
This commit is contained in:
parent
c3a8b6ff07
commit
ceff31241b
1 changed files with 2 additions and 2 deletions
|
@ -96,6 +96,8 @@ def main():
|
|||
lv = module.params['lv']
|
||||
size = module.params['size']
|
||||
state = module.params['state']
|
||||
size_opt = 'L'
|
||||
size_unit = 'm'
|
||||
|
||||
if state=='present' and not size:
|
||||
module.fail_json(msg="No size given.")
|
||||
|
@ -128,9 +130,7 @@ def main():
|
|||
module.fail_json(msg="Size unit should be one of [bBsSkKmMgGtTpPeE]")
|
||||
# when no unit, megabytes by default
|
||||
elif size.isdigit():
|
||||
size_unit = 'm'
|
||||
size = int(size)
|
||||
size_opt = 'L'
|
||||
else:
|
||||
module.fail_json(msg="Bad size specification")
|
||||
|
||||
|
|
Loading…
Reference in a new issue