xoxys.unifi/tasks/storage.yml

29 lines
848 B
YAML
Raw Normal View History

2018-07-08 18:50:35 +02:00
---
- block:
2019-01-09 22:13:40 +01:00
- name: Create volume group '{{ unifi_lvm_vg }}'
lvg:
vg: "{{ unifi_lvm_vg }}"
2019-08-04 22:34:55 +02:00
pvs: "{{ unifi_lvm_pvs | join(',') }}"
2019-08-04 22:31:25 +02:00
pesize: "4"
2018-07-08 18:50:35 +02:00
2019-01-09 22:13:40 +01:00
- name: Create logical volume '{{ unifi_lvm_lv }}'
lvol:
vg: "{{ unifi_lvm_vg }}"
lv: "{{ unifi_lvm_lv }}"
size: "{{ unifi_lvm_size }}"
2018-07-08 18:50:35 +02:00
2019-01-09 22:13:40 +01:00
- 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
2018-07-08 18:50:35 +02:00
2019-01-09 22:13:40 +01:00
- 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
2018-07-08 18:50:35 +02:00
become: True
2019-01-09 22:13:40 +01:00
become_user: root