mg
71aa41cb24
Co-authored-by: Michael Grote <michael.grote@posteo.de> Reviewed-on: mg/ansible#212 Co-authored-by: mg <mg@noreply.git.mgrote.net> Co-committed-by: mg <mg@noreply.git.mgrote.net>
24 lines
991 B
YAML
24 lines
991 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') }}"
|
|
recordsize: "{{ item.recordsize | default('128K') }}"
|
|
loop: "{{ zfs_datasets }}"
|
|
when: zfs_datasets is defined # führe nur aus wenn die Variable gesetzt ist
|