23 lines
929 B
YAML
23 lines
929 B
YAML
---
|
|
- name: create datasets
|
|
become: true
|
|
community.general.zfs:
|
|
name: "{{ item.dataset }}"
|
|
state: "{{ item.state | default('present') }}"
|
|
loop: "{{ zfs_datasets }}"
|
|
when: zfs_datasets is defined # führe nur aus wenn die Variable gesetzt ist
|
|
|
|
- name: set zfs properties per datasets
|
|
become: true
|
|
community.general.zfs:
|
|
name: "{{ item.dataset }}"
|
|
state: "{{ item.state | default('present') }}"
|
|
extra_zfs_properties:
|
|
compression: "{{ item.compression | default('lz4') }}"
|
|
sync: "{{ item.sync | default('standard') }}"
|
|
xattr: "{{ item.xattr | default('on') }}"
|
|
dnodesize: "{{ item.dnodesize | default('auto') }}"
|
|
atime: "{{ item.atime | default('off') }}"
|
|
snapdir: "{{ item.snapdir | default('hidden') }}"
|
|
loop: "{{ zfs_datasets }}"
|
|
when: zfs_datasets is defined # führe nur aus wenn die Variable gesetzt ist
|