Is this an observation or a question?
On Thu, 28 Jan 2021 at 23:27, Aris Aguirre <[email protected]> wrote: > 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 > > On Thursday, January 28, 2021 at 2:55:11 PM UTC-6 [email protected] > wrote: > >> On Thu, 28 Jan 2021 at 20:49, Aris Aguirre <[email protected]> wrote: >> > >> > 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. >> >> >> >> > >> -------------------------------------------------------------------------------- >> >> > --- >> > - hosts: dev >> > name: >> > become: yes >> > vars: >> > - lvname: lvaris >> > - vgname: vgaris >> > tasks: >> > >> > - name: Create Parted >> > parted: >> > device: /dev/sdb >> > number: 1 >> > state: present >> > >> > >> > - name: Create VG >> > lvg: >> > pvs: /dev/sdb1 >> > vg: "{{ vgname }}" >> > state: present >> > >> > - name: Create LV 600G >> > lvol: >> > vg: "{{ vgname }}" >> > lv: "{{ lvname }}" >> > state: present >> > size: 600G >> > >> > - name: Format to XFS >> > filesystem: >> > dev: /dev/{{ vgname }}/{{ lvname }} >> > fstype: xfs >> > >> > - name: Add fstab and mount >> > mount: >> > path: /tmp/aaa >> > src: /dev/{{ vgname }}/{{ lvname }} >> > state: mounted >> > fstype: xfs >> > >> > >> ------------------------------------------------------------------------- >> > >> > -- >> > You received this message because you are subscribed to the Google >> Groups "Ansible Project" group. >> > > To unsubscribe from this group and stop receiving emails from it, send >> an email to [email protected]. >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/6e2dbbe0-033e-4426-9a4c-2ca010a21558n%40googlegroups.com. >> >> >> >> >> -- >> Dick Visser >> Trust & Identity Service Operations Manager >> GÉANT >> > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/0179f704-5d8b-4bf3-8db6-bfbe77bafc20n%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/0179f704-5d8b-4bf3-8db6-bfbe77bafc20n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Sent from a mobile device - please excuse the brevity, spelling and punctuation. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAL8fbwMNrFq%3DBatNck0KjEQx64N1Ctg5uekAieksbsWwnS_f7w%40mail.gmail.com.
