2022-02-12 21:36:34 +00:00
|
|
|
---
|
|
|
|
# Setup the storage host. Install targetcli and make sure any volumes are mounted.
|
|
|
|
- name: Loading Variables from OS Common
|
|
|
|
import_tasks: tasks/common_vars.yml
|
|
|
|
|
|
|
|
- name: Install required packages
|
|
|
|
become: true
|
|
|
|
dnf:
|
|
|
|
name: targetcli
|
|
|
|
notify: enable_targetd
|
|
|
|
|
2022-02-14 03:51:11 +00:00
|
|
|
- name: Check if cinder_pv_device is set
|
|
|
|
stat:
|
|
|
|
path: "{{ cinder_pv_device | default('/dev/vdb') }}"
|
|
|
|
register: stat_cinder_pv_dev
|
|
|
|
|
2022-02-12 21:36:34 +00:00
|
|
|
- name: Create volume group for cinder
|
|
|
|
lvg:
|
|
|
|
pv_options: --metadatasize=2048
|
|
|
|
pvs: "{{ cinder_pv_device | default('/dev/vdb') }}"
|
|
|
|
vg: cinder-volumes
|
2022-02-14 03:51:11 +00:00
|
|
|
when:
|
|
|
|
- stat_cinder_pv_dev.stat.exists
|
|
|
|
- stat.cinder_pv_device.stat.isblk
|
|
|
|
|
2022-02-12 21:36:34 +00:00
|
|
|
...
|