mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
lvol: honor check_mode on thinpool (#2935)
* 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>
This commit is contained in:
parent
9b02230477
commit
b2b4877532
2 changed files with 5 additions and 2 deletions
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
bugfixes:
|
||||||
|
- lvol - honor ``check_mode`` on thinpool (https://github.com/ansible-collections/community.general/issues/2934).
|
|
@ -471,9 +471,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 a new issue