datavol: Support creating btrfs subvolumes
Set the `btrfs_subvolumes` variable to an array of objects with `name` and `device` properties to create btrfs subvolumes.frigate-exporter
parent
9d60ae1a61
commit
b6cc83ad82
15
datavol.yml
15
datavol.yml
|
@ -29,6 +29,21 @@
|
||||||
tags:
|
tags:
|
||||||
- mkfs
|
- mkfs
|
||||||
|
|
||||||
|
- name: ensure btrfs subvolumes exist
|
||||||
|
community.general.btrfs_subvolume:
|
||||||
|
name: '{{ item.name }}'
|
||||||
|
filesystem_device: '{{ item.device }}'
|
||||||
|
automount: true
|
||||||
|
loop: '{{ btrfs_subvolumes|d([]) }}'
|
||||||
|
tags:
|
||||||
|
- btrfs
|
||||||
|
|
||||||
|
- name: ensure mount point exists
|
||||||
|
file:
|
||||||
|
path: '{{ item.mountpoint }}'
|
||||||
|
state: directory
|
||||||
|
loop: '{{ data_volumes|d([]) }}'
|
||||||
|
|
||||||
- name: ensure data volume is mounted
|
- name: ensure data volume is mounted
|
||||||
mount:
|
mount:
|
||||||
path: '{{ item.mountpoint }}'
|
path: '{{ item.mountpoint }}'
|
||||||
|
|
Loading…
Reference in New Issue