mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-18 14:21:06 -07:00
Rework safety check on size arguments for when LV doesn't exist (#3681)
* Rework safety check on size arguments for when LV doesn't exist * Update changelogs/fragments/3681-lvol-fix-create.yml Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Jake Reynolds <jake.reynolds@bidfx.com> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
6f47ddc29f
commit
352047314b
2 changed files with 4 additions and 1 deletions
|
@ -451,7 +451,8 @@ def main():
|
|||
if this_lv is None:
|
||||
if state == 'present':
|
||||
if size_operator is not None:
|
||||
module.fail_json(msg="Bad size specification of '%s%s' for creating LV" % (size_operator, size))
|
||||
if size_operator == "-" or (size_whole not in ["VG", "PVS", "FREE", "ORIGIN", None]):
|
||||
module.fail_json(msg="Bad size specification of '%s%s' for creating LV" % (size_operator, size))
|
||||
# Require size argument except for snapshot of thin volumes
|
||||
if (lv or thinpool) and not size:
|
||||
for test_lv in lvs:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue