kayobe/ansible/lvm.yml
Mark Goddard d8fe45b3d8 Tag all (well, some of) the things (plays)
Having tagged plays allows us to easily run a subset of the plays for a
command, and perform targeted operations with less risk of unintended
consequences.

The tags are typically named after the playbook, although some of the
overcloud playbooks have been tagged without an overcloud- prefix.
2017-12-19 16:58:21 +00:00

22 lines
675 B
YAML

---
- name: Ensure LVM configuration is applied
hosts: seed:overcloud
tags:
- lvm
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