Files
ansible-manage-lvm/tasks/create_vg.yml
Gino Naumann 91f8cfca5d Add pvresize option
You can now define the pvresize per vg.

To avoid a breaking change, the global option pvresize_to_max is set as default
2024-01-16 12:50:12 +01:00

18 lines
500 B
YAML

---
- name: create_vg | creating new LVM volume group(s)
community.general.lvg:
vg: "{{ vg.vgname }}"
pvs: "{{ vg.disks | join(',') }}"
state: present
pvresize: "{{ vg.pvresize | default(pvresize_to_max) }}"
become: true
when:
- vg.create is defined
- vg.create|bool
- name: manage_lvm | loop over logical volume group(s) to create logical volumes
ansible.builtin.include_tasks: create_lv.yml
loop: "{{ vg.lvnames | default([]) }}"
loop_control:
loop_var: lv