xoxys.unifi/tasks/storage.yml
Robert Kaussow af0e6db37f
Some checks failed
continuous-integration/drone/push Build is failing
fix policy issues
2019-08-04 22:34:55 +02:00

29 lines
848 B
YAML

---
- block:
- name: Create volume group '{{ unifi_lvm_vg }}'
lvg:
vg: "{{ unifi_lvm_vg }}"
pvs: "{{ unifi_lvm_pvs | join(',') }}"
pesize: "4"
- name: Create logical volume '{{ unifi_lvm_lv }}'
lvol:
vg: "{{ unifi_lvm_vg }}"
lv: "{{ unifi_lvm_lv }}"
size: "{{ unifi_lvm_size }}"
- name: Create filesystem for '/dev/mapper/{{ unifi_lvm_vg }}-{{ unifi_lvm_lv }}'
filesystem:
fstype: "{{ unifi_lvm_fstype }}"
dev: "/dev/mapper/{{ unifi_lvm_vg }}-{{ unifi_lvm_lv }}"
resizefs: True
- name: Mount volume to '{{ unifi_base_dir }}'
mount:
path: "{{ unifi_base_dir }}"
src: "/dev/mapper/{{ unifi_lvm_vg }}-{{ unifi_lvm_lv }}"
fstype: "{{ unifi_lvm_fstype }}"
state: mounted
become: True
become_user: root