added compression on zfs role
This commit is contained in:
parent
14a6a2ab3f
commit
ebc90e7f9d
3 changed files with 8 additions and 3 deletions
|
@ -29,6 +29,7 @@ ipv6_forwarding: false
|
|||
|
||||
zfs_pools:
|
||||
- name: tank0
|
||||
compression: 'lz4'
|
||||
vdevs:
|
||||
- type: raidz1
|
||||
disks:
|
||||
|
@ -40,7 +41,6 @@ zfs_pools:
|
|||
properties:
|
||||
autoreplace: 'on'
|
||||
datasets:
|
||||
- name: iso_images
|
||||
- name: containers
|
||||
- name: vms
|
||||
- name: static
|
||||
- name: dynamic
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ zfs_pools:
|
|||
quota: '1T'
|
||||
mountpoint: '/mnt'
|
||||
- name: non_redondant_pool
|
||||
compression: 'lz4'
|
||||
disks:
|
||||
- ada9
|
||||
- ada10
|
||||
|
|
|
@ -39,6 +39,10 @@
|
|||
{% endif %}
|
||||
when: pool_exists.rc == 1
|
||||
|
||||
- name: Set pool compression
|
||||
command: zfs set compression={{ pool.compression }} {{ pool.name }}
|
||||
when: pool.compression is defined and pool_exists.rc == 1
|
||||
|
||||
- name: Create datasets in the pool
|
||||
community.general.zfs:
|
||||
name: "{{ pool.name }}/{{ item.name }}"
|
||||
|
|
Loading…
Reference in a new issue