summaryrefslogtreecommitdiff
path: root/openstack/usr/share/openstack/cinder-lvs.yml
blob: 7a91a306216154cc96090f0e861a230ab80eca16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
---
- hosts: localhost
  vars_files:
  - "/etc/openstack/cinder.conf"
  tasks:
  - name: Check that CINDER_DEVICE exists
    stat:
        path: "{{ CINDER_DEVICE }}"
    register: cinder_device_stats
    failed_when: cinder_device_stats.stat.exists == false

  - name: Configure LVM group for cinder
    lvg:
        vg: cinder-volumes
        pvs: "{{ CINDER_DEVICE }}"

  - lineinfile:
        dest: /etc/lvm/lvm.conf
        regexp: '# filter = \[ \"a\/\.\*/\" \]'
        line:    '    filter = [ "a|{{ CINDER_DEVICE }}|", "r/.*/" ]'
        backrefs: yes