I have a playbook below. But it only works on the nodes that has 800G (SDB) or the Volume Group has 800G free space. I am expecting that i Volume Group(vgaris) exist and only has 300G, it will still create 100G of lvaris.
I have a playbook below. But it only works on the nodes that has 800G (SDB) or the Volume Group has 800G free space. I am expecting that i Volume Group(vgaris) exist and only has 300G, it will still create 100G of lvaris.
Where does your expectation come from?
Because your lvol task has an explicit size parameter.
And the docs on
https://docs.ansible.com/ansible/latest/collections/community/general/lvol_module.html#parameter-size
mention no defaults.
If you need anything 'clever' you'd have to add that yourself to the playbook.
This usually is done by registering the output from one task, and
using that in the subsequent task(s) - with any
manipulation/transformation of it in between of course.
Lets put it this way. If the vgaris has 80G, it will just create the lvaris 60G with no problem. But if the vgaris has only 50G, then it cant create the 60G but will create a 40G lvaris.
Thanks
Is this an observation or a question?
Just an observation, I fixed it via block and rescue.