mirror of
https://github.com/mrlesmithjr/ansible-manage-lvm.git
synced 2025-12-14 05:45:22 +03:00
You can now define the pvresize per vg. To avoid a breaking change, the global option pvresize_to_max is set as default
18 lines
500 B
YAML
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
|