kayobe/ansible/lvm.yml
Matt Crees 505bb28b8d Correct name for role mrlesmithjr.manage_lvm
The name of ``mrlesmithjr.manage_lvm`` was changed yesterday in release
v0.2.10 to use an underscore, instead of a hyphen. As this changes the
name of the role on Ansible Galaxy, it needs to be updated in
``requirements.yml``.

Closes-Bug: #2024163
Change-Id: I4ea8d8c3a822a7c217bcfcfd5027eecfd21beaed
2023-06-16 11:01:34 +01:00

36 lines
1.2 KiB
YAML

---
- name: Ensure LVM configuration is applied
hosts: seed-hypervisor:seed:overcloud:infra-vms
tags:
- lvm
- upgrade-check
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
- name: Ensure LVM configuration is applied
vars:
manage_lvm: True
include_role:
name: mrlesmithjr.manage_lvm
apply:
become: True
when:
- lvm_groups is defined
- lvm_groups | length > 0