5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
23 # To avoid this warning in lvs -command: WARNING: Not using lvmetad because config setting use_lvmetad=0.
24 - name: patch use_lvmetad parameter in lvm.conf
25 lineinfile: path=/etc/ansible/roles/os_cinder/templates/lvm.conf.j2 regexp='^\s*use_lvmetad =' line=' use_lvmetad = 1'
27 - name: instance disks disk layout
29 msg: "Controller instance devices: {{ instance_disks }}"
30 when: instance_disks is defined
32 - name: make partition table for nova in controller
33 parted: device={{ item }} number=1 label=gpt state=present
34 with_items: "{{ instance_disks }}"
35 when: instance_disks is defined
37 - name: Inform the OS of partition table changes
38 shell: "/sbin/partprobe {{ item }}"
39 with_items: "{{ instance_disks }}"
40 when: instance_disks is defined
42 - name: set Linux LVM type to partition
43 shell: "[ -b {{ item }} ] | parted {{ item }} set 1 lvm on"
44 with_items: "{{ instance_disks }}"
45 when: instance_disks is defined
47 - name: cinder disk layout
49 msg: "Controller cinder devices: {{ devices }}"
50 when: devices is defined
52 - name: make partition table for cinder in controller
53 parted: device={{ item }} number=1 label=gpt state=present
54 with_items: "{{ devices }}"
55 when: devices is defined
57 - name: Inform the OS of partition table changes
58 shell: "/sbin/partprobe {{ item }}"
59 with_items: "{{ devices }}"
60 when: devices is defined
62 - name: set Linux LVM type to partition
63 shell: "[ -b {{ item }} ] | parted {{ item }} set 1 lvm on"
64 with_items: "{{ devices }}"
65 when: devices is defined