28 lines
879 B
YAML
28 lines
879 B
YAML
---
|
|
- block:
|
|
- name: Create volume group '{{ jellyfin_lvm_vg }}'
|
|
lvg:
|
|
vg: "{{ jellyfin_lvm_vg }}"
|
|
pvs: "{{ jellyfin_lvm_pvs | join(',') }}"
|
|
|
|
- name: Create logical volume '{{ jellyfin_lvm_lv }}'
|
|
lvol:
|
|
vg: "{{ jellyfin_lvm_vg }}"
|
|
lv: "{{ jellyfin_lvm_lv }}"
|
|
size: "{{ jellyfin_lvm_size }}"
|
|
|
|
- name: Create filesystem for '/dev/mapper/{{ jellyfin_lvm_vg }}-{{ jellyfin_lvm_lv }}'
|
|
filesystem:
|
|
fstype: "{{ jellyfin_lvm_fstype }}"
|
|
dev: "/dev/mapper/{{ jellyfin_lvm_vg }}-{{ jellyfin_lvm_lv }}"
|
|
resizefs: True
|
|
|
|
- name: Mount volume to '{{ jellyfin_base_dir }}'
|
|
mount:
|
|
path: "{{ jellyfin_base_dir }}"
|
|
src: "/dev/mapper/{{ jellyfin_lvm_vg }}-{{ jellyfin_lvm_lv }}"
|
|
fstype: "{{ jellyfin_lvm_fstype }}"
|
|
state: mounted
|
|
become: True
|
|
become_user: root
|