1a3de5e799
This role now expects disks to be passed as a list instead of a comma-separated string. This commit updates group variables to stop transforming disk lists to comma-separated strings and adds a check for users overriding LVM variables. The playbook is also tagged as upgrade-check. Change-Id: Ia8001c28a8be034ae79a1c584beb40bc66891db3
31 lines
1.1 KiB
YAML
31 lines
1.1 KiB
YAML
---
|
|
- name: Ensure LVM configuration is applied
|
|
hosts: seed:overcloud
|
|
tags:
|
|
- lvm
|
|
- upgrade-check
|
|
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([])
|
|
- name: Fail if the LVM physical disks are configured as a comma-separated string
|
|
fail:
|
|
msg: >
|
|
The physical disk list for volume {{ item.vgname }} must be
|
|
configured as a list instead of a comma-separated string. Ensure that
|
|
each volume group in 'lvm_groups' has a valid 'disks' list.
|
|
with_items: "{{ lvm_groups | default([]) }}"
|
|
when: item.disks | string() == item.disks
|
|
roles:
|
|
- role: mrlesmithjr.manage-lvm
|
|
manage_lvm: True
|
|
become: True
|
|
when:
|
|
- lvm_groups is defined
|
|
- lvm_groups | length > 0
|