mirror of
https://github.com/mrlesmithjr/ansible-manage-lvm.git
synced 2026-02-04 08:49:13 +03:00
* Fix: pvresize waiting for new collection lvg native support
This commit is contained in:
@@ -69,3 +69,9 @@ ebsnvme_binary_helper_path: '/sbin/go-ebsnvme'
|
|||||||
|
|
||||||
### nvme to scsi device name map script helper
|
### nvme to scsi device name map script helper
|
||||||
ebsnvme_scrip_helper_path: '/usr/local/bin/ebsnvme-id'
|
ebsnvme_scrip_helper_path: '/usr/local/bin/ebsnvme-id'
|
||||||
|
|
||||||
|
### auto pvresize (waiting until ansible 2.10 or above as collections have new lvg with integrated pvresize)
|
||||||
|
### waiting for new module in collection set to true or run pvresize manually on remote systems
|
||||||
|
### https://docs.ansible.com/ansible/3/collections/community/general/lvg_module.html
|
||||||
|
###
|
||||||
|
pvresize_to_max: false
|
||||||
|
|||||||
@@ -9,6 +9,20 @@
|
|||||||
- vg.create is defined
|
- vg.create is defined
|
||||||
- vg.create|bool
|
- vg.create|bool
|
||||||
|
|
||||||
|
### workaround: auto pvresize waiting for upgrade to new module supporting integrated pvresize
|
||||||
|
### ref: https://docs.ansible.com/ansible/3/collections/community/general/lvg_module.html
|
||||||
|
- name: create_vg | pvresize to max (implemented from ansible 2.10 and above)
|
||||||
|
shell: "pvresize {{ pv }}"
|
||||||
|
loop: "{{ vg.disks | default([]) }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: pv
|
||||||
|
changed_when: false
|
||||||
|
when:
|
||||||
|
- vg.create is defined
|
||||||
|
- vg.create|bool
|
||||||
|
- pvresize_to_max|bool
|
||||||
|
- ansible_version.full is version('2.10', '<')
|
||||||
|
|
||||||
- name: manage_lvm | loop over logical volume group(s) to create logical volumes
|
- name: manage_lvm | loop over logical volume group(s) to create logical volumes
|
||||||
include_tasks: create_lv.yml
|
include_tasks: create_lv.yml
|
||||||
loop: "{{ vg.lvnames | default([]) }}"
|
loop: "{{ vg.lvnames | default([]) }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user