xoxys.matrix/tasks/storage.yml

29 lines
865 B
YAML
Raw Normal View History

2019-01-18 13:52:23 +00:00
---
- block:
- name: Create volume group '{{ matrix_lvm_vg }}'
lvg:
pesize: "4"
2019-01-18 13:52:23 +00:00
vg: "{{ matrix_lvm_vg }}"
pvs: "{{ matrix_lvm_pvs | join(',') }}"
- name: Create logical volume '{{ matrix_lvm_lv }}'
lvol:
vg: "{{ matrix_lvm_vg }}"
lv: "{{ matrix_lvm_lv }}"
size: "{{ matrix_lvm_size }}"
- name: Create filesystem for '/dev/mapper/{{ matrix_lvm_vg }}-{{ matrix_lvm_lv }}'
filesystem:
fstype: "{{ matrix_lvm_fstype }}"
dev: "/dev/mapper/{{ matrix_lvm_vg }}-{{ matrix_lvm_lv }}"
resizefs: True
- name: Mount volume to '{{ matrix_base_dir }}'
mount:
path: "{{ matrix_base_dir }}"
src: "/dev/mapper/{{ matrix_lvm_vg }}-{{ matrix_lvm_lv }}"
fstype: "{{ matrix_lvm_fstype }}"
state: mounted
become: True
become_user: root