* lvol: support check_mode on thinpool
* add changelog
* Add %s when needed
* correct changelog sentence
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit b2b4877532
)
Co-authored-by: Amin Vakil <info@aminvakil.com>
pull/2944/head
parent
859bebbfc5
commit
ea873ae471
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
bugfixes:
|
||||||
|
- lvol - honor ``check_mode`` on thinpool (https://github.com/ansible-collections/community.general/issues/2934).
|
|
@ -442,9 +442,9 @@ def main():
|
||||||
if size_opt == 'l':
|
if size_opt == 'l':
|
||||||
module.fail_json(changed=False, msg="Thin volume sizing with percentage not supported.")
|
module.fail_json(changed=False, msg="Thin volume sizing with percentage not supported.")
|
||||||
size_opt = 'V'
|
size_opt = 'V'
|
||||||
cmd = "%s %s -n %s -%s %s%s %s -T %s/%s" % (lvcreate_cmd, yesopt, lv, size_opt, size, size_unit, opts, vg, thinpool)
|
cmd = "%s %s %s -n %s -%s %s%s %s -T %s/%s" % (lvcreate_cmd, test_opt, yesopt, lv, size_opt, size, size_unit, opts, vg, thinpool)
|
||||||
elif thinpool and not lv:
|
elif thinpool and not lv:
|
||||||
cmd = "%s %s -%s %s%s %s -T %s/%s" % (lvcreate_cmd, yesopt, size_opt, size, size_unit, opts, vg, thinpool)
|
cmd = "%s %s %s -%s %s%s %s -T %s/%s" % (lvcreate_cmd, test_opt, yesopt, size_opt, size, size_unit, opts, vg, thinpool)
|
||||||
else:
|
else:
|
||||||
cmd = "%s %s %s -n %s -%s %s%s %s %s %s" % (lvcreate_cmd, test_opt, yesopt, lv, size_opt, size, size_unit, opts, vg, pvs)
|
cmd = "%s %s %s -n %s -%s %s%s %s %s %s" % (lvcreate_cmd, test_opt, yesopt, lv, size_opt, size, size_unit, opts, vg, pvs)
|
||||||
rc, dummy, err = module.run_command(cmd)
|
rc, dummy, err = module.run_command(cmd)
|
||||||
|
|
Loading…
Reference in New Issue