kayobe/ansible/lvm.yml

21 lines
690 B
YAML

---
- name: Ensure LVM configuration is applied
hosts: seed:overcloud
pre_tasks:
- name: Fail if the LVM physical disks have not been configured
fail:
msg: >
The physical disk list has not been configured for volume
{{ item.vgname }}. Ensure that each volume group in 'lvm_groups'
has a valid 'disks' list.
with_items: "{{ lvm_groups | default([]) }}"
when:
- "{{ not item.disks | default([]) or 'changeme' in item.disks | default([]) }}"
roles:
- role: mrlesmithjr.manage-lvm
manage_lvm: True
become: True
when:
- "{{ lvm_groups is defined}}"
- "{{ lvm_groups | length > 0 }}"