summaryrefslogtreecommitdiffstats
path: root/ci/ansible/roles/osdsdock/scenarios/lvm.yml
blob: 743fe3bdd27971fb2cb1d6e0bc184dba10266ece (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
---
- name: install lvm2 external package when lvm backend enabled
  apt:
    name: lvm2

- name: copy opensds lvm backend file if specify lvm backend
  copy:
    src: ../../../group_vars/lvm/lvm.yaml
    dest: "{{ lvm_config_path }}"

- name: check if volume group existed
  shell: vgdisplay {{ vg_name }}
  ignore_errors: yes
  register: vg_existed

- name: create a volume group and initialize it
  lvg:
    vg: "{{ vg_name }}"
    pvs: "{{ pv_devices }}"
  when: vg_existed is undefined or vg_existed.rc != 0