storage
storage copied to clipboard
Make lvm size optional
Make lvm size option optional if only a single lvm is specified and assume 100% free space. If multiple lvms are specified, space should be required.
I like this idea, but it will take some care to get it right -- especially over multiple playbook runs.
I have an idea to solve the percentage size, free space and idempotency dilemmas:
separate size
and creationsize
. The latter would apply only if a new volume is being created, for existing volumes it would be ignored. The default could be 100% free space. It could be expressed both as absolute numbers, percentages of free space or percentages of total space.
The former (size
) would apply always. The default if not specified would be "do not change it". Only absolute units would be allowed. We could think about adding support for percentage of total space, but percentage of free space would be in any case forbidden.
I think that with this separation the role could be made idempotent with reasonable defaults for new volumes at the same time and keeping the specification reasonably simple as well.