blob: a3a6c463468080b96e8f0920462b8cdfd649f894 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
---
- name: Create physical device
shell: pvcreate /dev/{{ item }}
with_items: "{{ device }}"
- name: Create volume group
shell: vgcreate vg{{ item }} /dev/{{ item }}
with_items: "{{ device }}"
- name: Create thin pool
shell: lvcreate -L 950M -T vg{{ item }}/thinpool
with_items: "{{ device }}"
- name: Create thin volume
shell: lvcreate -V900M -T vg{{ item }}/thinpool -n thinp1
with_items: "{{ device }}"
- name: Format backend
filesystem: fstype=xfs dev=/dev/vg{{ item }}/thinp1
with_items: "{{ device }}"
- name: Create mount directory
file: path=/bricks/br{{ item }} state=directory recurse=yes
with_items: "{{ device }}"
- name: Add entry to fstab and mount
mount: name=/bricks/br{{ item }} src=/dev/vg{{ item }}/thinp1 fstype=xfs state=mounted
with_items: "{{ device }}"
|