mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* 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>
(cherry picked from commit 352047314b
)
Co-authored-by: jake2184 <jake2184@users.noreply.github.com>
This commit is contained in:
parent
440804fd62
commit
bffed2fda5
2 changed files with 4 additions and 1 deletions
2
changelogs/fragments/3681-lvol-fix-create.yml
Normal file
2
changelogs/fragments/3681-lvol-fix-create.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- lvol - allows logical volumes to be created with certain size arguments prefixed with ``+`` to preserve behavior of older versions of this module (https://github.com/ansible-collections/community.general/issues/3665).
|
|
@ -451,6 +451,7 @@ def main():
|
|||
if this_lv is None:
|
||||
if state == 'present':
|
||||
if size_operator is not None:
|
||||
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:
|
||||
|
|
Loading…
Reference in a new issue